Create a hidden <use>
element that refers to the path in the clip and gets a bounding box. Then you just need to intersect the bounding box of your object and the object of use.
<defs> <clipPath id="clipPath"> <path id="path" ...> </clipPath> </defs> <use id="clipPathBounds" visibility="hidden" xlink:href="#path"/>
source share