Re: Rotating an object
Re: Rotating an object
- Subject: Re: Rotating an object
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 17 Aug 2006 08:38:56 -0700
On 8/17/06, Tom Wenger <email@hidden> wrote:
Hi All,
I am trying to rotate objects with a given angle. I have been
experimenting with sketch sample.
I have modified drawInView function of its graphic class. I can see
the object gets rotated with below code,
but it becomes partially visible (drawing out of bounds).
Below is the code snippet.
[snip]
Any idea on this would be appreciated.
The rotation is happening relative to the lower left corner. You need
to translate to the center of what you are rotating (assuming that is
what you want) and then rotate.
Review...
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/chapter_4_section_3.html#//apple_ref/doc/uid/TP40003290-CH204-BCICHEAF>
-Shawn
_______________________________________________
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