Re: Advice for rotating content in a window so it doesn't get clipped

2012-09-07 Thread Uli Kusterer
On 06.09.2012, at 09:48, Eric Wing ewmail...@gmail.com wrote: I want the thing I'm rotating to stay centered relative to its original screen position, so when I resize the window, I need the view to not shift in absolute terms despite the fact that the window's origin (lower-left corner)

Re: Advice for rotating content in a window so it doesn't get clipped

2012-09-07 Thread Graham Cox
On 07/09/2012, at 7:14 PM, Uli Kusterer witness.of.teacht...@gmx.net wrote: distance between two points is sqrt(pow(a.x -b.x,2) + pow(a.y -b.y,2)), Or, much more simply, hypot( b.x - a.x, b.y - a.y ); --Graham ___ Cocoa-dev mailing list

Re: Advice for rotating content in a window so it doesn't get clipped

2012-09-07 Thread Eric Wing
On 9/7/12, Uli Kusterer witness.of.teacht...@gmx.net wrote: On 06.09.2012, at 09:48, Eric Wing ewmail...@gmail.com wrote: I want the thing I'm rotating to stay centered relative to its original screen position, so when I resize the window, I need the view to not shift in absolute terms despite

Advice for rotating content in a window so it doesn't get clipped

2012-09-06 Thread Eric Wing
I have a bunch of content in a non-square window I want to rotate with setFrameCenterRotation (using the animator). The content fills the existing window perfectly (i.e. to the edges), so for it to not be clipped on the edges of the window when it rotates, I need to increase the window size