Re: (freely) Rotating Text
Re: (freely) Rotating Text
- Subject: Re: (freely) Rotating Text
- From: Douglas Davidson <email@hidden>
- Date: Mon, 2 May 2005 09:46:49 -0700
On May 2, 2005, at 4:10 AM, Thomas Bruhin wrote: I am working on a graphing application which is nearly finished. The last problem to be solved is the one I now have serious trouble with: I want to be able to draw the labels for my horizontal axis not only horizontally (which works perfect using the drawAtPoint Method of the NSAttributedString class) but vertically (90 degrees rotated) and even in some other degree like 30 or 60 or whatever. I found a (partial) solution in the list-archives: "Unwanted clip of rotated text". I followed the thread Erez Anzel and Douglas Davidson had, and implemented the methods from Apples CircleView demo application. It works fine, however the overhead is quite big, since I have to draw each glyph individually. This was also noted by Douglas and he suggested to do it all in one call to the Glyph drawing method. But this gives me a really hard time :-( I just don't get it!
You're making this too complicated. Just use an NSAffineTransform followed by a drawAtPoint: or drawInRect:. The only tricky part is making sure you have the right affine transform to place your text where you want it.
Douglas Davidson
|
_______________________________________________
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