Re: Capturing portion of an NSView for drag-and-drop image
Re: Capturing portion of an NSView for drag-and-drop image
- Subject: Re: Capturing portion of an NSView for drag-and-drop image
- From: Douglas Davidson <email@hidden>
- Date: Fri, 18 May 2001 14:37:20 -0700
I'm trying to implement drag-and-drop functionality between two
NSMatrixes. I would like to take a "snapshot" of the visual state of a
NSCell to use as the dragging image. I couldn't find a way to just get
an NSImage * from anything
Typically you don't get an NSImage, but rather you create one and draw
into it.
Create an NSImage, lock focus onto it, do your drawing, and unlock focus.
This is not precisely screen capture; screen capture is about grabbing
the bits that have been drawn on the screen, from whatever source.
However, it sounds like it more closely matches what you want to do.
Douglas Davidson