Re: Window "Flash"
Re: Window "Flash"
- Subject: Re: Window "Flash"
- From: "Louis C. Sacha" <email@hidden>
- Date: Tue, 13 Jul 2004 23:24:20 -0700
Hello...
You might be able to get the effect you want by using the NSWindow
cacheImageInRect: and restoreCachedImage instance methods.
First get the contentView of the window, and get its bounds.
Then cache the contents of that rect using the NSWindow
cacheImageInRect: instance method.
Lock focus on the contentView, and do your temporary drawing to
create the flash effect (a fill using NSCompositeSourceOver and a
color with alpha @ 0.5 ?), and then use the NSWindow flushWindow
method to flush the temporary drawing to the screen.
After a slight delay, use restoreCachedImage to restore the original
contents of the window and call flushWindow again.
Hope that helps,
Louis
I would like to 'flash' a window, or briefly invert the contents.
Any suggestions on how to go about doing this?
Michael
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.