imaqGetPolygonArea

NI Vision for LabWindows/CVI Function

imaqGetPolygonArea

Usage

int imaqGetPolygonArea(const PointFloat* points, int numPoints, float* area);

Purpose

Computes the area of a polygon described by the coordinates of its vertices.

Parameters

Name

Type

Description

points const PointFloat* The array of points that describe the coordinate locations of the vertices of the polygon.
numPoints int The number of points in the supplied array. You must supply at least three points.
area float* On return, the area of the polygon. This parameter is required and cannot be NULL.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().