Re: rotated text in NSTextView
Re: rotated text in NSTextView
- Subject: Re: rotated text in NSTextView
- From: "Zef RosnBrick" <email@hidden>
- Date: Wed, 30 May 2007 15:20:30 -0500
NSView has the method setFrameRotation...
On 5/30/07, Ewan Delanoy <email@hidden> wrote:
Hello all,
I should like to construct a special NSTextView which displays its text
"rotated by 90 degrees" : it starts in the lower left corner, the lines
are vertical and the text goes upwards in a given line (the motivation for
this is to add print options to my Cocoa text editor that are not in the
standard printing machinery).
What would be the best way to do this in Cocoa ? I thought of the
following :
- subclass NSTextView, and add some NSAffineTransform code in the
drawRect: method, combined with a call to [super drawRect:rect]. The
problem is,
how to deal with the rotation of the frame rectangle ?
- Instead of subclassing an NSTextView, simply use an NSView combined
with a NSLayoutManager (much as in the CircleView example). But then, many
of the built-in functionalities of NSTextView for handling text would be
lost, wouldn't
they ?
Ewan
_______________________________________________
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
_______________________________________________
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