Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rotated text in NSTextView



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >rotated text in NSTextView (From: "Ewan Delanoy" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.