Quoting bulia byak <buliabyak@...400...>:
And by the way, your method will still need to be tweaked to account for markers and for gaussian blur (when we have it).
We're okay for markers, since (within the canvas, at least), they're child objects who contribute to their parents' bounding box.
Filter effects are a separate issue -- the output of some filters (e.g. feFlood, feImage, feTurbulence, etc...) is not related to the origin shape at all. So it's probably best to use larger of either the normal bbox or the filter effects region[1].
-mental
[1] http://www.w3.org/TR/SVG11/filters.html#FilterEffectsRegion
If otherwise unspecified, the filter effects region is going to be the object's bounding box, without stroke, plus 10% padding on all sides.