Contents

hotSpot

The position of the click location within the cursor.

Declaration

var hotSpot: NSPoint { get }

Discussion

The hot spot precisely determines the click location within the cursor’s image. Using its flipped coordinate system, you calculate the hot spot in points with the top-left corner acting as the origin. For example, the arrow cursor’s hot spot is at the intersection of its left and right edges, which is inset 4pts from the image’s corner to account for the arrow’s stroke and shadow.

[Image]

Note that an NSCursor object is immutable: you can’t change its hot spot after it’s created. Instead, use init(image:hotSpot:) to create a new cursor with the new settings.

See Also

Related Documentation

Setting cursor attributes