According to the Cocoa Drawing Guide documentation for Images, NSImage can load a Windows cursor .cur file.
But how do I obtain the hotspot needed for NSCursor - initWithImage:(NSImage *)newImage hotSpot:(NSPoint)point; ?
According to the Cocoa Drawing Guide documentation for Images, NSImage can load a Windows cursor .cur file.
But how do I obtain the hotspot needed for NSCursor - initWithImage:(NSImage *)newImage hotSpot:(NSPoint)point; ?
Copyright © 2021 Jogjafile Inc.
As the documentation also says,
So let's grab a sample cursor file and experiment in a Swift playground:
Output:
So, to get the hotspot safely:
Output: