calculateArea(_:for:orientedArea:)
Calculates the area for the specified contour.
Declaration
class func calculateArea(_ area: UnsafeMutablePointer<Double>, for contour: VNContour, orientedArea: Bool) throwsParameters
- area:
The output parameter to populate with the calculated contour area.
- contour:
The contour object for which to calculate the area.
- orientedArea:
A Boolean value that indicates whether to calculate the signed area (positive for counterclockwise-oriented contours and negative for clockwise-oriented contours). If you specify False, the returned area is always positive.
Discussion
Attempting to calculate the area for a contour containing random points, or with self-crossing edges, produces undefined results.