<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSBezierPath/contains(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSBezierPath(im)containsPoint:"
  },
  "title" : "contains(_:)"
}
-->

# contains(_:)

Returns a Boolean value that indicates whether the path contains the specified point.

```
func contains(_ point: NSPoint) -> Bool
```

## Parameters

`point`

The point to test against the path, specified in the path object’s coordinate system.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the path’s enclosed area contains the specified point; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

This method checks the point against the path itself and the area it encloses. When determining hits in the enclosed area, this method uses the non-zero winding rule ([`NSNonZeroWindingRule`](/documentation/AppKit/NSNonZeroWindingRule)). It does not take into account the line width used to stroke the path.

---

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)