contains(_:using:transform:)
Returns whether the specified point is interior to the path.
Declaration
func contains(_ point: CGPoint, using rule: CGPathFillRule = .winding, transform: CGAffineTransform = .identity) -> BoolParameters
- point:
The point to check.
- rule:
The rule for determining which areas to treat as the interior of the path. Defaults to the 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 transform if not specified.
Return Value
true if the point is interior to the path; otherwise, false.
Discussion
A point is contained in a path if it would be inside the painted region when the path is filled.