contains(_:)
Queries whether a point lies within the text container’s region or on the region’s edge—not simply within its bounding rectangle.
Declaration
func contains(_ point: NSPoint) -> BoolParameters
- point:
The point in question.
Return Value
true if aPoint lies within the receiver’s region or on the region’s edge—not simply within its bounding rectangle—false otherwise.
Discussion
For example, if the receiver defines a donut shape and aPoint lies in the hole, this method returns false. This method can be used for hit testing of mouse events.
The default NSTextContainer implementation merely checks that aPoint lies within its bounding rectangle.