How to perform zooming on text
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.