Re: rotating an object around the center of a view
Re: rotating an object around the center of a view
- Subject: Re: rotating an object around the center of a view
- From: Wain <email@hidden>
- Date: Sun, 4 Mar 2007 11:49:18 +0000
Hi,
Can you not do a - (void)translateXBy:(float)deltaX yBy:(float)deltaY
before your rotation?
Wain
On 4 Mar 2007, at 10:07, Ken Tozier wrote:
Hi
I'm writing a clock class and am having some trouble getting the
hands to rotate around the center of the view using an
NSAffineTransform. As it stands now, it's rotating the hands around
the lower left corner of the view. Is there any way to set the draw
origin of the view to the center without moving the view itself?
Alternately, is there a way to define a transform so that it
rotates from a specified point rather than the lower left corner?
Thanks
Ken
_______________________________________________
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