• 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
Re: Rotating NSViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rotating NSViews


  • Subject: Re: Rotating NSViews
  • From: Michael Becker <email@hidden>
  • Date: Sun, 18 Sep 2005 17:45:52 +0200

Am 17.09.2005 um 17:27 schrieb John C. Randolph:
simple question: How can I rotate an NSView's frame around its center? -setFrameRotation: rotates around the origin, and - translateOriginToPoint: only affects the bounds rectangle

The easiest way is to just move the origin to the center of the frame, and then rotate it.

Somehow I am just not getting it right. Here's the deal: My view (NSTextView) is positioned at (100, 100) in its superview, with a size of (50, 50). Now, I want to rotate that view around its center (at (125, 125) in superview coordinates). How exactly do I do this? When I use -setFrameOrigin:, the frame in its whole is moved and still rotates around its origin. If I use -setBoundsOrigin:, it doesn't seem to affect the rotation at all.


Am I missing something?

Regards,
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Rotating NSViews (From: Michael Becker <email@hidden>)
 >Re: Rotating NSViews (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: Newbie Q : show line numbers
  • Next by Date: Re: Draggable buttons
  • Previous by thread: Re: Rotating NSViews
  • Next by thread: setStandardInput Argument
  • Index(es):
    • Date
    • Thread