ImageEn, unit imageenview

TImageEnView.PolySelCount

TImageEnView.PolySelCount


Declaration

property PolySelCount: Integer; (Read-only)


Description

Returns the points number of the current polygonal selection (size of PolySel array).

Note: PolySelCount 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.


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

PolySel
AddSelPoint