ImageEn, unit imageenview

TImageEnView.PolySelCount

TImageEnView.PolySelCount

Declaration

property PolySelCount: Integer;

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.

Read-only

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