I am building an OSX app and would like to capture a portion of the screen with a similar interface as the cmd-shift-4 UX, IE initiating the action:
- presents a mouse cursor
- mouseDown and drag, mouseUp captures the screen coordinates while drawing a translucent overlay to denote the area being captured
I've found a good starting point in http://code.google.com/p/captureme/ which presents an NSPanel and captures the area within the panel. However I'd like do a bit better and emulate the cmd-shift-4 interface.
I am guessing that this is not built in (let me know if there's an existing solution), and I am going to have to use an NSResponder and replace the cursor on mouseDown, then on a mouse drag event redraw the translucent rectangle between origin (mouseDown) point and the current cursor location. I do not have experience with Quartz or drawing, so am not sure where to start. I'd appreciate if someone could point me in the right direction. Let me know if my thinking is along the correct lines.
Thanks!