Function

CGPathContainsPoint

Checks whether a point is contained in a graphics path.

Declaration

bool CGPathContainsPoint(CGPathRef path, const CGAffineTransform *m, CGPoint point, bool eoFill);

Parameters

path

The path to evaluate the point against.

m

An affine transform. If m is not NULL then the point is transformed by this affine transform prior to determining whether the path contains the point.

point

The point to check.

eoFill

A Boolean value that, if YES, specifies to use the even-odd fill rule to evaluate the painted region of the path. If NO, the winding fill rule is used.

Return Value

Returns YES if the point is contained in the path; NO otherwise.

Discussion

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

See Also

Getting Information about Core Graphics Paths

CGPathEqualToPath

Indicates whether two graphics paths are equivalent.

CGPathGetBoundingBox

Returns the bounding box containing all points in a graphics path.

CGPathGetPathBoundingBox

Returns the bounding box of a graphics path.

CGPathGetCurrentPoint

Returns the current point in a graphics path.

CGPathGetTypeID

Returns the Core Foundation type identifier for Core Graphics paths.

CGPathIsEmpty

Indicates whether or not a graphics path is empty.

CGPathIsRect

Indicates whether or not a graphics path represents a rectangle.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software