• 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 affinely transform an NSView's content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to affinely transform an NSView's content


  • Subject: How to affinely transform an NSView's content
  • From: "Ewan Delanoy" <email@hidden>
  • Date: Fri, 20 Apr 2007 14:50:54 +0200 (CEST)
  • Importance: Normal

         Hello all,

 I have trouble connecting the different parts of the documentation
that deal with drawing rotated/translated/resized images. I think
NSAffineTransform
is the tool I need. The "Cocoa Drawing Guide: Using Transforms in
Your Code" section provides code snippets, but

 1) It is not clear in which method those snippets must be put
( drawRect: , initWithFrame: ?)

 2) Some snippets contain the metaphorical instruction
[item draw];
  When "item" is the contents of a rect in an NSView, I don't
see what real-life instruction should replace it.


 My aim is the following : To create a subclass RotatedView
of NSView that has a constructor method

 -(id) initWithView: (NSView*) originalView

It is intended that the contents of subrectangle "rect1" of "originalView"
should be re-drawed in the RotatedView instance,
with a rotation of alpha degrees and compression factors cWidth,
cHeight, starting from point newOrigin. The RotatedView instance is
used later for printing.

                             Can anyone help me out on this ? TIA,

                                                                    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

  • Prev by Date: Re: doubleClick slop?
  • Next by Date: Re: How to affinely transform an NSView's content
  • Previous by thread: Re: Blank help files
  • Next by thread: Re: How to affinely transform an NSView's content
  • Index(es):
    • Date
    • Thread