(Solved)RE: text drawing question
(Solved)RE: text drawing question
- Subject: (Solved)RE: text drawing question
- From: Vinay Prabhu <email@hidden>
- Date: Thu, 26 Apr 2007 18:16:07 +0530
- Importance: Normal
Thanks for the help,
Now I am flipping each line and drawing.
Regards
Vinay
-----Original Message-----
From: Douglas Davidson [mailto:email@hidden]
Sent: Wednesday, April 25, 2007 9:36 PM
To: Vinay Prabhu
Cc: email@hidden
Subject: Re: text drawing question
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