Re: Possible to draw an NSMutableAttributedString into a CGContextRef?
Re: Possible to draw an NSMutableAttributedString into a CGContextRef?
- Subject: Re: Possible to draw an NSMutableAttributedString into a CGContextRef?
- From: Ken Tozier <email@hidden>
- Date: Fri, 13 Apr 2007 23:02:21 -0400
On Apr 13, 2007, at 2:28 PM, Scott Ribe wrote:
You could create an NSGraphicsContext with
+graphicsContextWithGraphicsPort and then render the string into it.
Thanks Albert. That did the trick.
You might also have to flip it, translate it, rotate it to get it
oriented
and drawn properly into the context (use NSAffineTransform). My
most recent
experience was with a context for printing, in landscape, and I got
a pretty
serious headache trying to make the text come out with the letters
right
side up & not mirrored, and drawn left to right & top to bottom,
all at the
same time. But it does work.
Luckily, I didn't run into this flipping problem. I generate images
on the fly and don't apply flipping to anything so it "just works™"
Ken_______________________________________________
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