всем спасибо за помощь
delphi Код:
function GetVector : integer;
begin
result:=0;
if (dx>0) and (dy>0) then result:=1 else
if (dx<0) and (dy>0) then result:=2 else
if (dx>0) and (dy<0) then result:=3 else
if (dx<0) and (dy<0) then result:=4 else exit;
end;
if (dx<>0) and (dy<>0) then
begin
case GetVector of
1: Dec(y);
2: Dec(y);
3: Inc(y);
4: Inc(y);
end;
Form.Scene.Canvas.Pixels[x,y]:=clBlack;
end;