---
title: "contains(_:using:transform:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgpath/contains(_:using:transform:)"
---

# contains(_:using:transform:)

Returns whether the specified point is interior to the path.

## Declaration

```swift
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 doc://com.apple.coregraphics/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 doc://com.apple.coregraphics/documentation/CoreGraphics/CGAffineTransformIdentity transform if not specified.

## Return Value

Return Value true if the point is interior to the path; otherwise, false.

## Discussion

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

## See Also

### Related Documentation

- [CGPathFillRule](coregraphics/cgpathfillrule.md)

### Examining a Graphics Path

- [boundingBox](coregraphics/cgpath/boundingbox.md)
- [boundingBoxOfPath](coregraphics/cgpath/boundingboxofpath.md)
- [currentPoint](coregraphics/cgpath/currentpoint.md)
- [isEmpty](coregraphics/cgpath/isempty.md)
- [isRect(_:)](coregraphics/cgpath/isrect(_:).md)
