Re: text drawing question
Re: text drawing question
- Subject: Re: text drawing question
- From: Douglas Davidson <email@hidden>
- Date: Wed, 25 Apr 2007 09:05:33 -0700
On Apr 25, 2007, at 1:03 AM, Vinay Prabhu wrote:
With the above code, instead of flipping character by character, it
flipps
the entire drawing coordinates.
So instead of drawing like,
Line 1
Line 2
Line 3
It draws like,
Line3
Line2
Line1
So how do I flip character by character and draw?
It inverts the entire drawing coordinates because that's what you've
told it to do. If you want to flip line by line (as it sounds like
you do) then you can change the transform (the translation part) for
each line and draw each line individually. See the CircleView
example for something similar, except that CircleView draws glyph by
glyph rather than line by line. You can get the range for each line
of text as the effective range from
lineFragmentRectForGlyphAtIndex:effectiveRange:.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden