![]() |
|
|||||||
| Tutorials This forum focuses on showing people how to do things in Delphi for PHP including step by step how-to guldes and screencasts etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello!
Hello! The line draw in delphi (use timer): Code:
var x1,x2,y1,y2:integer; t:extended; procedure TForm1.Button1Click(Sender: TObject); begin timer1.enabled:=true; x1:=10;x2:=100; y1:=100;y2:=140; t:=0; end; procedure TForm1.Timer1Timer(Sender: TObject); var x,y:integer; begin if t<=1 then begin x:=round((1-t)*x1+t*x2); y:=round((1-t)*y1+t*y2); PaintBox1.Canvas.Pixels[x,y]:= clRed; t:=t+0.01; end else timer1.enabled:=false; end; bet help me - how draw RECTANGLE in Delphi rectangle (use Timer). Thanx. |
| Sponsored Links |
|
|
|
|||
|
Snuppy,
This is a PHP programming forum (Delphi for PHP). It is not a Delphi (Object Pascal) programming forum. Regards, Gerald.
__________________
Don't forget to add to a users reputation if they have helped you. |