Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?
Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?
- Subject: Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?
- From: Douglas Davidson <email@hidden>
- Date: Tue, 8 Jul 2008 15:53:51 -0700
On Jul 8, 2008, at 3:44 PM, Stéphane Sudre wrote:
What I mean by incorrect value is that if I draw the string inside a
rectangle whose width is inMaxWidth and height is the value obtained
from the rect returned by usedRectForTextContainer:, the last line
of the string is clipped outside the rectangle. And the difference
increases with the number of lines.
Most likely you are dealing with a mismatch between the way you are
measuring and the way you are drawing, probably a difference in the
typesetterBehavior. Typesetter behavior issues have been discussed on
the lists a number of times; try searching the archives.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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