ImageEn, unit imageenview

TImageEnView.PolySel

TImageEnView.PolySel


Declaration

property PolySel[idx: Integer]: TPoint; (Read-only)


Description

Returns the idx point of the current polygonal selection. The point is specified in bitmap coordinates.

Note:
If there are multiple selections, they will be separated by the point($FFFFF, $FFFFF)
PolySel will only be valid if a polygonal/vectorial selection has been made, e.g. by using miSelectPolygon. A vectorial selection is a series of lines forming a vectorial selection shape. It is not valid for non-vectorial selections, i.e. selections that are represented by a bitmap, e.g. when using SelectColors or SelectNonAlpha. For non-vectorial/bitmap selections use IsPointInsideSelection to determine whether specific pixels are selected.
To create a polygonal selection in code see AddSelPoint


Example

var
  MyPolySelArray: array of TPoint;
  I: Integer;
begin
  // Create an array of TPoints of the polygon selection in a TImageEnView
  SetLength( MyPolySelArray, ImageEnView1.PolySelCount );
  for I := 0 to ImageEnView1.PolySelCount - 1 do
    MyPolySelArray[ I ] := ImageEnView1.PolySel[ I ];
end;


See Also

PolySelCount
PolySelPoints
AddSelPoint