Re: Rotating NSViews
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