Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: get the drawing text height
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get the drawing text height




On Jan 26, 2009, at 11:45 AM, David Alter wrote:

I'm drawing a string to screen and I want to get the height if I specify a
specific width. I'm drawing the string by using the NSString drawInRect:
withAttributes:. I do not see how I can get the height after the text has
wrapped. I have looked at NSString sizeWithAttributes, but there does not
appear to be away to set the width so I can compute the height the text will
take up.
Any ideas?


<http://developer.apple.com/documentation/Cocoa/Conceptual/TextLayout/Tasks/StringHeight.html#//apple_ref/doc/uid/20001809 >

Nick Zitzmann
<http://www.chronosnet.com/>



_______________________________________________

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


References: 
 >get the drawing text height (From: David Alter <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.