Re: NSCopyBits
Re: NSCopyBits
- Subject: Re: NSCopyBits
- From: Esteban Uribe <email@hidden>
- Date: Mon, 31 Mar 2003 13:16:50 -0800
Hi Andrew,
On Monday, March 31, 2003, at 11:46AM, Andrew Frezell <email@hidden> wrote:
>
Do I need to pass in the NSView and call
>
displayInRect on it, to get the repaint to occur or should it occur
>
immediately after calling NSCopyBits? I'm am doing the painting in an
>
OpenGL view, so could there be any issues with this? Any help or tips
>
on using NSCopyBits would really help. I would like the results to
>
paint immediately, so I think I need displayInRect as opposed to
>
setNeedsDisplayInRect.
>
You probably want to get you view, named say...myView
and lockFocus on it before calling NSCopyBits.
[myView lockFocus];
lockFocus is supposed to make the NSView's graphic state the current one.
This way you should be able to call NSCopyBits with a NSNullObject, to use the
current graphic state to draw into. (Or says the docs)
you can then call unlockFocus to revert to the previous graphic state.
[myView unlockFocus];
Hope this helps,
-Esteban
_______________________________________________
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.