> On Aug 28, 2019, at 12:33 PM, Gabriel Zachmann via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
>   NSRect string_rect = CGRectIntegral( [mesg_string boundingRectWithSize: 
> drawRect_.size

What is drawRect_ set to when this is called?

It's been a while since I used this, but IIRC the output width will be the same 
as the input, with the height increased to account for the number of lines the 
string is broken into.

With NSStringDrawingUsesLineFragmentOrigin, if the text is broken into lines, 
it's not going to tell you the exact pixel width of the widest line.

In single-line mode (without NSStringDrawingUsesLineFragmentOrigin) I believe 
you do get the exact dimensions of the single line of text.


Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to