Re: NSBezierPath to NSImage?
Re: NSBezierPath to NSImage?
- Subject: Re: NSBezierPath to NSImage?
- From: Michael Briscoe <email@hidden>
- Date: Tue, 30 Apr 2002 15:07:51 -0700
Hi List,
I'm a bit embarrassed by that post. I realized this morning after taking
a fresh look at my code, that it was a coordinates discrepancy.
Everything's working fine now.
Sorry about that :-(
Best Regards,
Michael Briscoe
SkyRocket Multimedia
http://www.digitalfireworks.com/SkyRocket/index.html
On Tuesday, April 30, 2002, at 02:42 PM, John C. Randolph wrote:
On Monday, April 29, 2002, at 08:45 PM, Michael Briscoe wrote:
Hello List!
This is probably a stupid question, but it's driving me nuts! Is there
a way to draw NSBezierPath's directly to an NSImage?
Of course.
I need this so that I can render the NSBezierPath data as a bitmap,
and use composite operations in my NSView.
Here's an except of my code:
theImage = [[NSImage alloc] initWithSize:NSMakeSize(theSize, theSize)];
[theImage lockFocus];
[self drawShape]; // bezier path drawing routines
[theImage unlockFocus];
This doesn't seem to be working.
You're not showing us enough code here to see what's going wrong. What
does -drawShape do? Are you sure that your path lies entirely within
the borders of the image? What's the current color when you stroke or
fill the path? What's the background color, etc?
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.