I'm trying to create a little utility that will draw an arbitrary shape on the screen below the mouse pointer (basically like drawing a line that follows the cursor). This could be anywhere on the screen not in a specific window.
My problem is that I can't figure out how to draw on the "screen". Is there a layer or a view object that I can use that references the overall os "view"? I've looked in NSScreen and don't see anything in there.
Any examples or ideas would be great.
Thanks.
Create a transparent overlay window over the area where you want to draw (this could be the whole screen or screens). Set the window level so it appears below the cursor. Apple has some sample code which may help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With