FROM : Douglas Davidson
DATE : Mon Feb 18 21:53:38 2008
On Feb 18, 2008, at 11:53 AM, Keith Blount wrote:
> Many thanks for your reply, much appreciated. The trouble is that I
> don't just need the measurements of the text that is laid out in the
> text container, but also of the arbitrary control string that I am
> going to draw behind the text, using NSString's -
> drawWithAttributes:. Would I have to set up a separate layout
> manager to calculate all of the measurements for the control glyphs?
> (I suppose I could cache that information given that the control
> glyph attributes and thus sizes won't change.)
That sounds like a reasonable plan, if it really is an arbitrary text
string. Another option might be to use
drawWithRect:options:attributes:, which can do baseline-relative
drawing.
Douglas Davidson
DATE : Mon Feb 18 21:53:38 2008
On Feb 18, 2008, at 11:53 AM, Keith Blount wrote:
> Many thanks for your reply, much appreciated. The trouble is that I
> don't just need the measurements of the text that is laid out in the
> text container, but also of the arbitrary control string that I am
> going to draw behind the text, using NSString's -
> drawWithAttributes:. Would I have to set up a separate layout
> manager to calculate all of the measurements for the control glyphs?
> (I suppose I could cache that information given that the control
> glyph attributes and thus sizes won't change.)
That sounds like a reasonable plan, if it really is an arbitrary text
string. Another option might be to use
drawWithRect:options:attributes:, which can do baseline-relative
drawing.
Douglas Davidson
| Related mails | Author | Date |
|---|---|---|
| Keith Blount | Feb 18, 13:25 | |
| Douglas Davidson | Feb 18, 19:44 | |
| Keith Blount | Feb 18, 20:53 | |
| Douglas Davidson | Feb 18, 21:53 | |
| Keith Blount | Feb 19, 14:01 |






Cocoa mail archive

