tags:

views:

8

answers:

0

Hello. I'm using Safari 3d transforms to do some effects. I'd like to lay down some images using the classic Coverflow effect. The problem is that I'd like to know the exact width of each image after it has been rotated with

-webkit-transform : rotateY( angle deg);

Notice I even apply perspective.

Of course the DOM gives the width of the original image, but how to get a bounding box or just the width? I tried using cosine and trigonometry but the figures I obtain are different from the on screen result. Probably this is due to the perspective. Anyway to calculate the width after rotation I just done: ImageWidth * cos(angle). If there was a way to get a bounding box of the transformed object I'd be done with it.