Re: Displaying Text Vertically
Re: Displaying Text Vertically
- Subject: Re: Displaying Text Vertically
- From: email@hidden
- Date: Thu, 16 Feb 2006 18:31:41 -0800
I'd like to display the text on its side. Sorry, I should have
been clearer.
Prior to rendering it however you would normally do so, offset and
rotate the current graphics context. See the documentation for
NSGraphicsContext and NSAffineTransform.
Note that a mere rotation won't do - that'll rotate around the
origin, which presumably is not where you're rendering your text.
You'll want to first translate the origin to the point you want to
rotate around (typically the text origin), then perform the rotation,
then draw your string (with a position of {0, 0}, since your origin
will by now be positioned where you want your text to start).
Make sure to save your graphics context first, then pop it off again,
so your changes to the origin and rotation aren't permanent.
If you're talking about rotation an NSTextView or similar, then you
could play with the setBoundsRotation: and so forth... I don't have
any experience with them myself.
Wade Tregaskis
ICQ: 40056898
AIM, Yahoo & Skype: wadetregaskis
MSN: email@hidden
iChat & email: email@hidden
Jabber: email@hidden
Google Talk: email@hidden
http://homepage.mac.com/wadetregaskis/
-- Sed quis custodiet ipsos custodes?
_______________________________________________
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