Re: Grabbing what's behind a window
Re: Grabbing what's behind a window
- Subject: Re: Grabbing what's behind a window
- From: David Duncan <email@hidden>
- Date: Mon, 29 Oct 2007 16:15:35 -0700
On Oct 29, 2007, at 3:49 PM, Kenny Leung wrote:
I'm trying to make a transparent "lens" effect on the screen using a
core-image filter. When it's time to update, I orderOut the window
I'm drawing in, grab the background, and then orderFront the window
with the transformed contents. Unfortunately, this does not work - I
keep grabbing the contents of my own window. I have tried the
orderOut, then doing the grab in a performSelector:afterDelay, but
this generates an annoying flicker.
I'm wondering if what I'm trying to do is an impossibility - or is
there some trick by which it can be done?
If you can require Leopard, then your best bet would be to use the new
CGWindow API. It will allow you to specifically exclude your
application and capture the composited contents of the screen or any
portion there of into a CGImageRef. Mike Paquette recently posted a
summary of this (see his posts from 10/26) and a sample is in the
pipeline to be released from DTS.
--
David Duncan
Apple DTS Quartz and Printing
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden