ImageEn, unit iexLayers

TIEAngleLayer.GetPointEx

TIEAngleLayer.GetPointEx


Declaration

function GetPointEx(index: integer; PointBase: TIEPointBase = iepbRange): TDPoint; overload;
procedure GetPointEx(var pts: TIEAnglePoints; PointBase: TIEPointBase = iepbRange); overload;


Description

Gets the three points used to specify an angle (where point 1 is vertex).
First overload returns point for an index (in range 0 - 2).
Second overload requires passing an array[0..2] of TPoint (see example).


Examples

with TIEAngleLayer( 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,
                                              GetPointEx( 2, iepbBitmap ).X, GetPointEx( 2, iepbBitmap ).Y ]);
ShowMessage(s);


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


See Also

- Points
- SetPoints