Best way to get the the bbox of an element with respect to its transformations?

Hello, I was wondering, is there was a simple way to calculate the bounding
box of an SVG element with respect to its transformations? The getBBox
method does not seem to take transformations into account.
I'm using the transform attribute because it seems to be the easiest and
most elegant way to translate a group of elements. However, I still need to
get the bounding box of the group in terms of the viewport coordinate space.
If there is not an easy way to get the bounding box of an element with
respect to its transform, it seems like there are only two alternatives:
1)
to make a newer, smarter getBBox method that does take transforms into
account, or

2) to not use translate, instead recursively changing the x,y values
of every member of a group.
However, neither of these seems like a very pretty solution, so I am
somewhat stuck...
I would greatly appreciate any guidance anyone can provide. Thanks.

Jake

Received on Monday, 10 September 2007 21:47:21 UTC