• 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: Linearly Scaling Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linearly Scaling Text


  • Subject: Re: Linearly Scaling Text
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 25 May 2011 14:41:28 -0700

On May 25, 2011, at 2:37 PM, Ajay Sabhaney wrote:

> - Instead of trying to scale text linearly, use a transformation to scale the NSTextView and image representation appropriately.  While this is easy to do with an image, I am having some issues scaling an NSTextView.  I've tried subclassing NSTextView, then in the drawRect method, I apply an affine transformation, then call the super's drawRect.  This almost works, except the caret acts as if no transformation was applied - it's size and position are unchanged even though the text is not.  I've also tried using the NSView method scaleUnitSquareToSize: - however this produces fuzzy text.

Try taking a look at the source code for TextEdit--it's available as sample code, and it gives an example of scaling for NSTextViews.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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:
    • Re: Linearly Scaling Text
      • From: Ajay Sabhaney <email@hidden>
    • Re: Linearly Scaling Text
      • From: Aki Inoue <email@hidden>
References: 
 >Linearly Scaling Text (From: Ajay Sabhaney <email@hidden>)

  • Prev by Date: Linearly Scaling Text
  • Next by Date: Re: Linearly Scaling Text
  • Previous by thread: Linearly Scaling Text
  • Next by thread: Re: Linearly Scaling Text
  • Index(es):
    • Date
    • Thread