<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/VNGeometryUtils/calculateArea(_:for:orientedArea:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "c:objc(cs)VNGeometryUtils(cm)calculateArea:forContour:orientedArea:error:"
  },
  "title" : "calculateArea(_:for:orientedArea:)"
}
-->

# calculateArea(_:for:orientedArea:)

Calculates the area for the specified contour.

```
class func calculateArea(_ area: UnsafeMutablePointer<Double>, for contour: VNContour, orientedArea: Bool) throws
```

## Parameters

`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 <doc://com.apple.documentation/documentation/Swift/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)