You are here: Start » AVL.NET » AVL.RegionArea(AvlNet.Region, int)

AVL.RegionArea(AvlNet.Region, int)

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void RegionArea(
	AvlNet.Region inRegion,
	out int outArea
)

Parameters

inRegion
Type: AvlNet.Region
outArea
Type: System.Int32

Examples

Area of the sample region equals to 5567.

Following example draws a red circles that bounds regions, which area is lower than 2000 pixels. It is a part of the bigger Blob Analysis Example.

            foreach (Region mount in mounts)
            {
                int area;
                AVL.RegionArea(mount, out area);
                if (area < 2000)
                {
                    Circle2D circle;
                    AVL.RegionBoundingCircle(mount, out circle);
                    AVL.DrawCircle(ref mountsImage, circle, red, style);
                }
            }

Errors

Error type Description
DomainError The area of the region exceeds the capacity of the integer type in RegionArea.

See also