Тема: линия
Показать сообщение отдельно
Старый 21.04.2011, 02:54   #40
Местный
 
Аватар для supernewbie
 
Регистрация: 23.09.2009
Сообщений: 1,232
Сказал Спасибо: 119
Имеет 172 спасибок в 134 сообщенях
supernewbie пока неопределено
По умолчанию

всем спасибо за помощь

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;
__________________
Начало.
supernewbie вне форума   Ответить с цитированием