AttributedString drawing
AttributedString drawing
- Subject: AttributedString drawing
- From: "Aychamo Aychamo" <email@hidden>
- Date: Wed, 11 Oct 2006 12:31:54 -0400
Hello
I am trying to draw an NSAttributedString to the screen. I can do that
just fine, but when I draw it in my rect, I want to line it up on the
right side of the rectangle.
What I would like to do is to draw it at: (rect.size.width -
myAttributedString.length). The length, however, needs to be the
number of pixels it will take to render the attributed string on the
screen.
I've looked through the docs, and found an NSAttibutedString extension
called "size" which should return an NSRect, but when I use that it's
just giving me random huge numbers instead of the size of the string.
So basically, I need to figure out a way to calculate the length (in
pixels), of the attributed string. Does anyone have any suggestions,
Thank you,
AA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden