Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?

2008-07-08 Thread Stéphane Sudre
On Jul 9, 2008, at 12:53 AM, Douglas Davidson wrote: 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 usedRectForTextContain

Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?

2008-07-08 Thread Stéphane Sudre
On Jul 6, 2008, at 11:26 PM, Jean-Daniel Dupas wrote: Le 6 juil. 08 à 21:25, Stéphane Sudre a écrit : Problem: I would like/need to know the height that would be required to render a string inside a fixed width box. Solution that does not work: So f

Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?

2008-07-08 Thread Douglas Davidson
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 th

Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?

2008-07-08 Thread Stéphane Sudre
On Jul 8, 2008, at 1:26 AM, Jean-Daniel Dupas wrote: Le 7 juil. 08 à 23:54, Stéphane Sudre a écrit : On Jul 6, 2008, at 11:26 PM, Jean-Daniel Dupas wrote: Le 6 juil. 08 à 21:25, Stéphane Sudre a écrit : Problem: I would like/need to know the height that would be required to r

Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?

2008-07-07 Thread Jean-Daniel Dupas
Le 7 juil. 08 à 23:54, Stéphane Sudre a écrit : On Jul 6, 2008, at 11:26 PM, Jean-Daniel Dupas wrote: Le 6 juil. 08 à 21:25, Stéphane Sudre a écrit : Problem: I would like/need to know the height that would be required to render a string inside a fixed width box. Solution tha

Re: [NSTextStorage/NSAttributedString] How can we know the height of a rendered string?

2008-07-06 Thread Jean-Daniel Dupas
Le 6 juil. 08 à 21:25, Stéphane Sudre a écrit : Problem: I would like/need to know the height that would be required to render a string inside a fixed width box. Solution that does not work: So far, I've been using a solution found from a google searc

[NSTextStorage/NSAttributedString] How can we know the height of a rendered string?

2008-07-06 Thread Stéphane Sudre
Problem: I would like/need to know the height that would be required to render a string inside a fixed width box. Solution that does not work: So far, I've been using a solution found from a google search and which looks like this: - (float) heightOf