Re: NSGraphicsContext restore crashes my xtension
Re: NSGraphicsContext restore crashes my xtension
- Subject: Re: NSGraphicsContext restore crashes my xtension
- From: "Michael Ash" <email@hidden>
- Date: Sun, 27 Jul 2008 19:19:51 -0400
On Sun, Jul 27, 2008 at 7:09 PM, glenn andreas <email@hidden> wrote:
>
> If you call [NSGraphicsContext currentContext] before your
> setCurrentContext:, what do you get back?
>
> Whatever that is, that's the context to restore with a second
> [NSGraphicsContext setCurrentContext: ] at the end...
This is all a bit excessive. The NSGraphicsContext class methods for
saving/restoring state *do* save and restore the graphics context too.
Just wrap the whole thing in [NSGraphicsContext saveGraphicsState] and
[NSGraphicsContext restoreGraphicsState] and off you go.
Mike
_______________________________________________
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