On 19 Aug 2013, at 17:35, Graham Cox <[email protected]> wrote:
> > On 19/08/2013, at 12:05 PM, Gerriet M. Denkmann <[email protected]> wrote: > >> Here is the final code (if there is anything wrong or not quite right, >> please feel free to critizise it): > >> [NSGraphicsContext setCurrentContext: bitmapContext2 ]; > > > You might want to save and restore the current graphics context around the > whole thing so that you don't leave it set to your bitmap. It may well be > harmless, but always better to play nice. Good idea. I added: NSGraphicsContext *originalContext = [NSGraphicsContext currentContext]; ... do stuff ... [NSGraphicsContext setCurrentContext: originalContext ]; I had indeed some (non-reproducible) error messages, which may very well be the result of this omission: [...]: _initWithWindowNumber: error creating graphics ctxt object for ctxt:0x30917, window:0xffffffff Thanks a lot for pointing this out! Kind regards, Gerriet. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
