Le 27 nov. 08 à 00:14, Jean-Nicolas Jolivet a écrit :

I know this might seem like a weird idea, but I need to figure out the size (width and height) of an NSAttributedString that I am drawing... basically I need to know it because I am drawing it inside a larger image and I need to position it... however the string can be of any font/size/length... is there a way to do this?? I'm guessing the height would probably be the font's point? (i.e. font size 24 would result in a height of 24pt?) how about the width? any way to find that out before drawing it? (or even after drawing it to an intermediate image if I really need to?)

Any ideas are welcomed!


Google:  "getting size of nsattributedstring"

At least the first ten results.

And if you don't want to search, this is - [NSAttributedString size].

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/Reference/Reference.html#/ /apple_ref/occ/instm/NSAttributedString/size

_______________________________________________

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]

Reply via email to