ImageEn, unit iexLayers

TIELineLayer.GetPointEx

TIELineLayer.GetPointEx


Declaration

function GetPointEx(index: integer; PointBase: TIEPointBase = iepbBitmap): TDPoint; overload;
procedure GetPointEx(var pts: TIELinePoints; PointBase: TIEPointBase = iepbBitmap); overload;
procedure GetPointEx(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.


Examples

with TIELineLayer( ImageEnView1.CurrentLayer ) do
  s := Format('(%d, %d) (%d, %d) (%d, %d)', [ GetPointEx( 0, iepbBitmap ).X, GetPointEx( 0, iepbBitmap ).Y,
                                              GetPointEx( 1, iepbBitmap ).X, GetPointEx( 1, iepbBitmap ).Y ]);
ShowMessage(s);


var
  pts: TIELinePoints;
  i: integer;
begin
  GetPointEx( pts, iepbBitmap );
  for i := 0 to 1 do
    ShowMessage( IntToStr( pts[ i ].X ) + ',' + IntToStr( pts[ i ].Y ) );
end;


See Also

- LinePoint1
- LinePoint2
- LineLength
- Points
- GetPointEx