• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: text drawing question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • (Solved)RE: text drawing question
      • From: Vinay Prabhu <email@hidden>
References: 
 >text drawing question (From: Vinay Prabhu <email@hidden>)

  • Prev by Date: Re: How to draw a rectangle around a (graph) view?
  • Next by Date: Re: How to draw a rectangle around a (graph) view?
  • Previous by thread: text drawing question
  • Next by thread: (Solved)RE: text drawing question
  • Index(es):
    • Date
    • Thread