Open
Description
Expected Behavior
Please describe what should happen
Actual Behavior
Describe what actually happens
Steps to Reproduce
Explain what someone needs to do in order to see what's described in Actual behavior above
Those screenshots are from importing a simple SVG with a somewhat thicker stroke width set. This is the SVG I used:
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<circle r="50" cx="50" cy="50" stroke-width="5" stroke="black" fill="none" />
</svg>
I have seen this in a number of real-world projects as well, for example https://scratch.mit.edu/projects/22508123/. This also came up when trying to design think/say bubbles in SVG. They get clipped in the same way.
We use svg.getBBox()
to calculate the width/height of the svg, which only uses the geometry of the elements and not visual styles like stroke-width (source). I'm not sure how we can solve this...