You are here: Start » AVL.NET » Function Reference » Region » Region Basics » AVL.CreatePolygonRegion

AVL.CreatePolygonRegion

Creates a polygonal region corresponding to a given closed path.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CreatePolygonRegion
(
	AvlNet.Path inPolygon,
	int inFrameWidth,
	int inFrameHeight,
	AvlNet.Region outRegion
)

Parameters

Name Type Range Default Description
inPolygonAvlNet.Path
inFrameWidthint<0, 65535>Width of the created region's frame.
inFrameHeightint<0, 65535>Height of the created region's frame.
outRegionAvlNet.RegionOutput region.

Description

The operation creates a region containing pixels lying inside the shape described by inPolygon.

The inFrameWidth and inFrameHeight parameters most often should be set equal to the dimensions of the image this region will be used with. If the input polygon exceeds these dimensions, the output region will be cropped.

Examples

Remarks

  • inPolygon has to be a closed path, otherwise an error with appropriate description occurs.

Errors

List of possible exceptions:

Error type Description
DomainError Open path on input in CreatePolygonRegion.

Function Overrides

See also