ImageEn, unit iexLayers

TIEAngleLayer.GetPoints

TIEAngleLayer.GetPoints

Declaration

function GetPoints(index: Integer; PointBase: TIEPointBase = iepbRange): TDPoint; overload;
procedure GetPoints(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 to 2).
Second overload requires passing an array[0..2] of TPoint (see example).
PointBase specifies the basis of the points. The default is iepbRange, which means the x and y values are in the range 0 to 1000 where (0, 0) is the top-left pixel of the layer and (1000, 1000) is the bottom-right.

Examples

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


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

See Also

◼Points
◼SetPoints
◼TIELineLayer.GetPoints
◼TIEPolylineLayer.GetPoints