Re: Draw windows offscreen
Re: Draw windows offscreen
- Subject: Re: Draw windows offscreen
- From: "Timothy J. Wood" <email@hidden>
- Date: Wed, 15 Jun 2005 20:26:14 -0700
On Jun 15, 2005, at 6:38 PM, Pierre CHATEL wrote:
is there a way to draw an entire NSWindow offscreen ?
If you create the window w/o the deferred bit set and then tell it
to -display itself, it shouldn't need to fill its back buffer.
I want to modify the NSWindow class so that when
'makeKeyAndOrderFront' is called the window instance is drawed
offscreen and I can get a NSBitmapImageRep with the entire window.
What exactly are you going to do with this bitmap? Reading a
bitmap off the window can be slow. If you are going to use that
bitmap for further drawing into another window, you'd be better of
using CGLayerRef (new in 10.4). Alternatively, you might find -
[NSView bitmapImageRepForCachingDisplayInRect:] to suit your needs
(not sure if the NSBitmapImageRep that comes back from this lives on
the GPU or not).
I'm also looking for a way to grab screen portions to
NSBitmapImageRep...
-[NSBitmapImageRep initWithFocusedViewRect:] or the aforementioned
NSView method are likely candidates.
-tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden