Instance Method

containsPoint:

Returns a Boolean value indicating whether the receiver contains the specified point.

Declaration

- (BOOL)containsPoint:(NSPoint)point;

Parameters

aPoint

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

Return Value

YES if the path's enclosed area contains the specified point; otherwise, NO.

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). It does not take into account the line width used to stroke the path.