• 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: behind the scenes of -drawInRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: behind the scenes of -drawInRect:


  • Subject: Re: behind the scenes of -drawInRect:
  • From: Joshua Scott Emmons <email@hidden>
  • Date: Fri, 26 May 2006 18:35:44 -0500

Is there any way to make -[NSAttributedString drawInRect:] use 10.4's typesetting instead of making NSLayoutManager use 10.2's?
Unfortunately, no.

One thing I'm curious about is why using -[NSAttributedString drawInRect:] when you have NSLayoutManager ?
It's more efficient to match up measurement/rendering API in text handling.

Ah. I was under the impression that -[NSAttributedString drawInRect:] was lighter weight. But now that you mention it, it makes sense that it would have to do all the things I'm doing with NSLayoutManager anyway just to wrap and layout the text in the given rect, wouldn't it? Is -drawInRect: just a convenience for setting up and tearing down NSLayoutManager et al. on the fly?


If so this will be the second time in as many months I've been bitten by not knowing what some shortcut-method was a shortcut for! Is there a way I should have been able to intuit what -drawInRect: was doing behind the scenes from docs/common sense? If not, maybe I'll file a documentation enhancement request to have that fleshed out a little, unless you think that's frivolous.


As ever, thanks for straightening me out ;-) -Joshua Emmons

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: behind the scenes of -drawInRect:
      • From: Scott Ellsworth <email@hidden>
    • Re: behind the scenes of -drawInRect:
      • From: Douglas Davidson <email@hidden>
References: 
 >behind the scenes of -drawInRect: (From: Joshua Scott Emmons <email@hidden>)
 >Re: behind the scenes of -drawInRect: (From: Douglas Davidson <email@hidden>)
 >Re: behind the scenes of -drawInRect: (From: Joshua Scott Emmons <email@hidden>)
 >Re: behind the scenes of -drawInRect: (From: Aki Inoue <email@hidden>)

  • Prev by Date: Re: behind the scenes of -drawInRect:
  • Next by Date: Re: NSXLMDocument and malformed XML
  • Previous by thread: Re: behind the scenes of -drawInRect:
  • Next by thread: Re: behind the scenes of -drawInRect:
  • Index(es):
    • Date
    • Thread