RE: drawing text onto an NSImage
RE: drawing text onto an NSImage
- Subject: RE: drawing text onto an NSImage
- From: Ben Zotto <email@hidden>
- Date: Sat, 2 Dec 2006 20:36:03 -0800
Thank you, Douglas. I was doing almost this, but I had been setting the image to flipped *after* locking focus on it, where it needed to be done beforehand.Thanks again for the quick help!BenCC: email@hiddenom: email@hiddenbject: Re: drawing text onto an NSImageDate: Fri, 1 Dec 2006 13:24:36 -0800[...]Here is something adapted from currently working code, showing how to draw text into an NSImage: image = [[NSImage alloc] initWithSize:size]; [image setFlipped:YES]; [image lockFocus]; [layoutManager drawGlyphsForGlyphRange:glyphRange atPoint:point]; [image unlockFocus];Douglas Davidson
_________________________________________________________________
Use Messenger to talk to your IM friends, even those on Yahoo!
http://ideas.live.com/programpage.aspx?versionId=7adb59de-a857-45ba-81cc-685ee3e858fe_______________________________________________
Cocoa-dev mailing list (email@hidden)
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