I'm using a rather complex SVG shape exported from Illustrator as a clipping path.
The problem is that objectBoundingBox requires path data to be within the 0-1 range, and my path contains path data out of this range. Here is what I'm using:
<svg>
<clippath id="clipping" clipPathUnits="objectBoundingBox">
<path d="M228.6,94.8L176.8, 5.5c-2-3.5-5.8-5.5-9.9-5.5H63.2c-4.1, 0-7.8, 1.9-9.9,5.5L1.5,94.9c-2, 3.5-2,7.8,0, 11.4 l51.8, 89.8c2,3.5, 5.8,5.9,9.9,5.9h103.7c4.1, 0, 7.8-2.4,9.9-6l51.8-89.7C230.7, 102.8,230.7, 98.3,228.6,94.8z M192.8,104.4l-35.5,
61.5c-1.4,2.4-4,4.1-6.8, 4.1h-71c-2.8,0-5.4-1.7-6.8-4.1l-35.5-61.4c-1.4-2.4-1.4-5.5,0-7.9l35.5-61.5c1.4-2.4,4-4.1,6.8-4.1h71c2.8, 0, 5.4,1.7,6.8,4.1l35.5, 61.4C194.2,98.9, 194.2, 102, 192.8, 104.4z"/>
</clippath>
</svg>
Is there an easy solution to convert this to the 0-1 range so that I can use objectBoundingBox?
RE: Comment. I am able to apply any number of transforms to the SVG element, but it still doesn't work with objectBoundingBox. For example:
<clippath id="clipping" transform="scale(1,1)" clipPathUnits="objectBoundingBox">
See Question&Answers more detail:
os