Re: Basic NSGraphicsContext question
Re: Basic NSGraphicsContext question
- Subject: Re: Basic NSGraphicsContext question
- From: Jim Crafton <email@hidden>
- Date: Fri, 4 Jul 2003 16:36:11 -0400
I think you probably want to look at the lockFocus and unlockFocus
methods of NSImage. Something like
NSImage *myImage = [[NSImage alloc] initWithSize:NSMakeSize(width,
height)];
[myImage lockFocus];
// Draw here
[myImage unlockFocus];
will get you an NSImage that you can render to the window using the
various compositing and/or drawing methods.
Is it possible to get the NSGraphicsContext that the NSImage uses ?
If not, is it possible to use the lower level Quartz 2D drawing API and
still integrate nicely with Cocoa ?
I was reading up on it, and Quartz has methods to create a bitmap GC,
which is precisely what I want. However I am not sure how this
corresponds to the Cocoa world.
Thanks
Jim
_______________________________________________
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.