With the svgRoot.paint(g); used before it still comes out wrong, but if for example I draw the outlines like this
g.draw(svgRoot.getRoot().getOutline());
Then the scaling of the stroke is correct and as expected
I can't find anything about this online and I wonder if there's something already built in to repaint the svg in different scales without loosing the stroke width fedelity...
Every example I managed to find online (not many out there) for painting an svg with the Batik / EchoSVG library, will suggest something like this
or this
Which results in an image that looks as if the vector image got painted with the original dimensions and then got scaled to the final dimensions
I then tried to set the width and height manually to the desired final dimension, hoping it would scale the svg before painting it, like this
With the
svgRoot.paint(g);
used before it still comes out wrong, but if for example I draw the outlines like thisThen the scaling of the stroke is correct and as expected
I can't find anything about this online and I wonder if there's something already built in to repaint the svg in different scales without loosing the stroke width fedelity...