• 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
How to perform zooming on text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to perform zooming on text


  • Subject: How to perform zooming on text
  • From: Arnaud Forgiel <email@hidden>
  • Date: Thu, 31 Oct 2002 00:30:50 -0800 (PST)

Hello all,

I'm currently trying to implement some text viewer/editor features in my app, at different scale (or zooming factor). Despite all the information available on NSMutableAttributedString, NSLayoutManager, NSTextStorage, etc., I didn't find a (easy) way to draw formatted text in a rectangle with a scaling factor not equal to 1. The cocoa documentation mentions an attribute named "ViewZoom" but changing it doesn't work.

Does anybody know how to perform such a task? One obvious solution would be to parse the attributes and to change the font size information "on the fly". This is still a "heavy" solution in contradiction with the MVC model (it changes the model info for the view).

BTW, I'm using the NSLayoutManager drawing methods, without a NSTextView. It follows the same approach as in the Sketch cocoa example from Apple.

Regards,

Arnaud
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: How to perform zooming on text
      • From: Douglas Davidson <email@hidden>
    • Re: How to perform zooming on text
      • From: "Andrew M. Salamon" <email@hidden>
  • Prev by Date: Re: GUI - Brushed Metal
  • Next by Date: spaces in pahts
  • Previous by thread: Re: Code reuse problems
  • Next by thread: Re: How to perform zooming on text
  • Index(es):
    • Date
    • Thread