Declarations ​
pascal
procedure LineTo(const X, Y: TFloat); overload;
procedure LineTo(const P: TFloatPoint); overload; virtual;Overload Details
Overload 1 ​
pascal
procedure LineTo(const X, Y: TFloat); overload;Appends a line segment to absolute coordinate (X, Y).
| Parameter | Type | Description |
|---|---|---|
X, Y | TFloat | Destination X and Y coordinates. |
Overload 2 ​
pascal
procedure LineTo(const P: TFloatPoint); overload; virtual;Appends a line segment to absolute point P.
| Parameter | Type | Description |
|---|---|---|
P | TFloatPoint | Destination point. |
Description ​
LineTo appends a straight line segment connecting CurrentPoint to a specified absolute destination point and updates CurrentPoint to the target location.
Example ​
pascal
var
Canvas: TCanvas32;
begin
Canvas := TCanvas32.Create(MyBitmap);
try
Canvas.MoveTo(10.0, 10.0);
Canvas.LineTo(200.0, 10.0);
Canvas.LineTo(FloatPoint(200.0, 150.0));
Canvas.EndPath(False);
finally
Canvas.Free;
end;
end;