<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGPath/contains(_:using:transform:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "s:So9CGPathRefa12CoreGraphicsE8contains_5using9transformSbSo7CGPointV_AC0A8FillRuleOSo17CGAffineTransformVtF"
  },
  "title" : "contains(_:using:transform:)"
}
-->

# contains(_:using:transform:)

Returns whether the specified point is interior to the path.

```
func contains(_ point: CGPoint, using rule: CGPathFillRule = .winding, transform: CGAffineTransform = .identity) -> Bool
```

## Parameters

`point`

The point to check.

`rule`

The rule for determining which areas to treat as the interior of the path. Defaults to the [`CGPathFillRule.winding`](/documentation/CoreGraphics/CGPathFillRule/winding) rule if not specified.

`transform`

An affine transform to apply to the point before checking for containment in the path. Defaults to the [`CGAffineTransformIdentity`](/documentation/CoreGraphics/CGAffineTransformIdentity) transform if not specified.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the point is interior to the path; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

A point is contained in a path if it would be inside the painted region when the path is filled.

## See Also

[`CGPathFillRule`](/documentation/CoreGraphics/CGPathFillRule)

Rules for determining which regions are interior to a path, used by the [`fillPath(using:)`](/documentation/CoreGraphics/CGContext/fillPath(using:)) and [`clip(using:)`](/documentation/CoreGraphics/CGContext/clip(using:)) methods.



---

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)