Re: white screen windows at first
Re: white screen windows at first
- Subject: Re: white screen windows at first
- From: Bill Appleton <email@hidden>
- Date: Wed, 28 Apr 2010 11:29:36 -0700
hi all,
i have been working on this a lot & have some new information
previously i was using carbon and core graphics
when i draw to the screen, sometimes it is in the update event but sometimes
it was in response to a mouse click, or some other event
this always worked:
*
QDBeginCGContext(grafptr, &cgContext);
CGContextSaveGState(cgContext);
draw with core graphics here...
CGContextRestoreGState(cgContext);
QDEndCGContext(grafptr, &cgContext);*
but when i switched to cocoa, i started doing this:
*cgcontext = [[myNSWindowPtr graphicsContext] graphicsPort];*
*CGContextSaveGState(cgContext);*
*draw with core graphics here...
CGContextRestoreGState(cgContext);
*this appears to only work from inside the drawRect routine, if i get here
from some other event it doesn't work
so is it "legal" to draw on an NSWindow from some other event?
if not, what the heck does QDEndCGContext do that makes it work?
thanks,
bill
*
*
On Wed, Apr 28, 2010 at 2:51 AM, vincent habchi <email@hidden> wrote:
> Le 28 avr. 2010 à 10:10, Paul Sanders a écrit :
>
> >> this problem must be because i am using core graphics
>
> There is no problem using Core Graphics, especially if your NSView is
> backed by a CALayer. I do that routinely on the small GIS I try to develop.
>
> Vincent
_______________________________________________
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