| To: | REALbasic Games <realbasic-games at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: Drawing Rotated Image |
| From: | Troy Rollins <troy at rpsystems dot net> |
| Date: | Fri, 23 Sep 2005 11:00:52 -0400 |
| Delivered-to: | realbasic-games at lists dot realsoftware dot com |
| References: | <496bf51a05092019337180466a at mail dot gmail dot com> <a06200704bf567b8c2eb0 at 10 dot 0 dot 1 dot 4> <496bf51a0509211826355b31bb at mail dot gmail dot com> <a06200702bf57caa5de4d at 10 dot 0 dot 1 dot 4> <496bf51a050922191027900e59 at mail dot gmail dot com> <a06200703bf59bdf0dd80 at [10 dot 0 dot 1 dot 4]> |
On Sep 23, 2005, at 10:17 AM, Joseph J. Strout wrote: Let's see, I haven't had my coffee yet so I'm not sure this is the simplest way to do it, but one way to find the rotated position of a corner is to first convert it into polar coordinates (r = sqrt(dx^2+dy^2), ang = ATan2(dx,dy)), then add the rotation amount to the angle (ang), and convert back to cartesian coordinates (dx2 = r*cos(ang), dy2 = r*sin(ang)).Nothing that can't be solved with a little math! :) Can't just ask the PixMap for its new width and height, huh? Darn. ;-) -- Troy RPSystems, Ltd. http://www.rpsystems.net _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Drawing Rotated Image, Joseph J. Strout |
|---|---|
| Next by Date: | Re: Drawing Rotated Image, Joseph J. Strout |
| Previous by Thread: | Re: Drawing Rotated Image, Joseph J. Strout |
| Next by Thread: | Re: Drawing Rotated Image, Joseph J. Strout |
| Indexes: | [Date] [Thread] [Top] [All Lists] |