• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Possible to draw an NSMutableAttributedString into a CGContextRef?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Possible to draw an NSMutableAttributedString into a CGContextRef? (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: NSXMLDocument and XSLT
  • Next by Date: NSDocumentController recentDocumentURLs hiding non-file based URLs
  • Previous by thread: Re: Possible to draw an NSMutableAttributedString into a CGContextRef?
  • Next by thread: making an NSView with scrollbars "inactive"
  • Index(es):
    • Date
    • Thread