Instance Method

contains(_:)

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

Declaration

func contains(_ point: NSPoint) -> Bool

Parameters

aPoint

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

Return Value

true if the path's enclosed area contains the specified point; otherwise, false.

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