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

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


References: 
 >Rotating an object (From: "Tom Wenger" <email@hidden>)

  • Prev by Date: NSTableView w/Contextual Menu
  • Next by Date: Re: Bind button avail to edit field content
  • Previous by thread: Rotating an object
  • Next by thread: Re: Rotating an object
  • Index(es):
    • Date
    • Thread