I am creating an OSX application and would like to capture part of the screen using a similar interface, such as CMD-shift-4 UX, IE, the trigger action:
- represents the mouse cursor
- mouseDown and drag, mouseUp fixes the coordinates of the screen when drawing a translucent overlay to indicate the captured area.
I found a good starting point at http://code.google.com/p/captureme/ which represents the NSPanel and captures the area inside the panel. However, I would like to improve and imitate the cmd-shift-4 interface a bit.
I can not find if something like this is built in (or if there is an existing solution). I assume that the direct way is to use NSRsponder and replace the cursor with mouseDown, then for the drag event, draw a translucent rectangle between the mouseDown point and the current cursor location. Let me know if my thoughts match the right lines.
Thank!
source
share