Declaration
function GetPoints(index: integer; PointBase: TIEPointBase = iepbBitmap): TDPoint; overload;
procedure GetPoints(var pts: TIELinePoints; PointBase: TIEPointBase = iepbBitmap); overload;
procedure GetPoints(var pts: array[0..1] of TPoint; PointBase: TIEPointBase = iepbBitmap); overload;
Description
Gets the two points that make up the line.
First overload returns point for an index (in range 0 - 1).
Second overload requires passing an array[0..1] of TDPoint (see example).
Second overload requires passing an array[0..1] of TPoint.
This is the same as reading
LinePoint 1 and 2, but provides some extra parameters.
with TIELineLayer( ImageEnView1.CurrentLayer ) do
s := Format('(%d, %d) (%d, %d) (%d, %d)', [ GetPoints( 0, iepbBitmap ).X, GetPoints( 0, iepbBitmap ).Y,
GetPoints( 1, iepbBitmap ).X, GetPoints( 1, iepbBitmap ).Y ]);
ShowMessage(s);
var
pts: TIELinePoints;
i: integer;
begin
GetPoints( pts, iepbBitmap );
for i := 0 to 1 do
ShowMessage( IntToStr( pts[ i ].X ) + ',' + IntToStr( pts[ i ].Y ) );
end;
See Also
◼LinePoint1
◼LinePoint2
◼LineLength
◼Points
◼GetPoints