• 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 an object around the center of a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >rotating an object around the center of a view (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: fopen() works only in debugger
  • Next by Date: Re: rotating an object around the center of a view
  • Previous by thread: rotating an object around the center of a view
  • Next by thread: Re: rotating an object around the center of a view
  • Index(es):
    • Date
    • Thread