• 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
rotated text in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rotated text in NSTextView


  • Subject: rotated text in NSTextView
  • From: "Ewan Delanoy" <email@hidden>
  • Date: Wed, 30 May 2007 21:19:20 +0200 (CEST)
  • Importance: Normal

         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

  • Follow-Ups:
    • Re: rotated text in NSTextView
      • From: "Zef RosnBrick" <email@hidden>
  • Prev by Date: Re: refreshing core data controller
  • Next by Date: StartCalendarInterval Question
  • Previous by thread: SNMP API and Cocoa
  • Next by thread: Re: rotated text in NSTextView
  • Index(es):
    • Date
    • Thread