You are here: Start » AVL.NET » AVL.CreatePolygonRegion(AvlNet.Path, AvlNet.CoordinateSystem2D?, int, int, AvlNet.Region, AvlNet.Path)

AVL.CreatePolygonRegion(AvlNet.Path, AvlNet.CoordinateSystem2D?, int, int, AvlNet.Region, AvlNet.Path)

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void CreatePolygonRegion(
	AvlNet.Path inPolygon,
	AvlNet.CoordinateSystem2D? inPolygonAlignment,
	int inFrameWidth,
	int inFrameHeight,
	out AvlNet.Region outRegion,
	out AvlNet.Path outAlignedPolygon
)

Parameters

inPolygon
Type: AvlNet.Path
inPolygonAlignment
Type: System.Nullable<AvlNet.CoordinateSystem2D>
inFrameWidth
Type: System.Int32
inFrameHeight
Type: System.Int32
outRegion
Type: AvlNet.Region
outAlignedPolygon
Type: AvlNet.Path

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

Error type Description
DomainError Open path on input in CreatePolygonRegion.
DomainError Output region too big in CreatePolygonRegion.

See also