Why do you feel the need to cache this context? Compared to drawing
its fairly cheap to refetch it every time your -drawRect: is called.
As an expression of the API, there is no guarantee that the context
you get is the same for every invocation of -drawRect:.
In the -(void)drawRect:(NSRect)aRect function of my NSViews, I get
this stored nativecontext and draw on it, doing a
CGContextSaveGState first, and a CGContextRestoreGState when I'm
done. Inside the drawRect, I clip to the aRect, using
The drawing should already be clipped to the area of aRect, so you
shouldn't have to clip it yourself.
Apple DTS Animation and Printing
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden