Find new width and height of a rotated item
807588Jun 2 2009 — edited Jun 2 2009hi all,
I have an issue where I have a rectangle that I rotate and I need to know the new width and height of the bounding box of the rectangle when it has been rotated
example:
I have this rectangle shape
****
****
****
****
so its known width and height is 20pixels x 60pixels
now i rotate the rectangle by 90 degrees
so it looks like this
**********
**********
now its 60pixels x 20 pixels
but all i know is the width height is 20 x 60
how do I calculate the new width and height after rotation?
obviously a rotation of 45 degrees would mean the bounding box will not be 20 x 60 or 60 x 20 so I need to take that into consideration
thanks