On Thu, Jul 17, 2008 at 12:18 AM, norio <[EMAIL PROTECTED]> wrote: > I think QuickTime API had an api for measuring the width and the height of > an attributed string. > If width was passed as an argument, the height was returned. And if height, > returned its width. > > Is there any ways to get such information? >
For an NSString with attributes dictionary, AppKit has a category with some methods that sound like what you want: <http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSString_AppKitAdditions/> For an NSAttributedString there are a couple of methods in its AppKit category too: <http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/> (Namely, -size and -boundingRectWithSize:options:) Phil _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]