Board index » delphi » Line

Line

Hi~ I'm first time to try delphi.
How can I draw a line?
In pascal I use line(x,y,x1,y1), but what about in delphi?
 

Re:Line


Hi Latnemele

Either directly on the form canvas like this

Form1.Canvas.MoveTo(StartX,StartY); {This is the point where to start}
Form1.Canvas.LineTo(EndX,EndY);      {and this is the end-point}

or on an image:

Image1.Canvas.MoveTo(StartX,StartY);
Image1.Canvas.LineTo(EndX,EndY);

This is the way, but you'd better have some reading about Canvas component
and it's properties.

Good luck

Bj?rn Jonsson

Latnemele <elemen...@hknet.com> skrev i
diskussionsgruppsmeddelandet:38a6a...@newsgate.hknet.com...

Quote
> Hi~ I'm first time to try delphi.
> How can I draw a line?
> In pascal I use line(x,y,x1,y1), but what about in delphi?

Other Threads