Re: behind the scenes of -drawInRect:
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