Can the graph unit execute that program . Are there any alternatives to
execute the below program other than go to GKS ?
Can I execute the call set_pixel using other graphic library ?
procedure dda(xl,yl,x2,y2:integer);
var
dx,dy,steps,k:integer;
x_increment,y_increment,x,y:real;
begin
dx:=x2-xl;
dy:=y2-yl;
if abs(dx) > abs (dy) then
begin
steps:=abs(dx);
end
else
begin
steps:=abs(dy);
x_increment:=dx/steps;
y_increment:=dy/steps;
x:=xl;
y:=yl;
set_pixel(round(x),round(y));
for k:=1 to steps do begin
x:=x+x_increment;
y:=y+y_increment;
set_pixel(round(x),round(y));
end
end;


|