Closed schildbach closed 9 years ago
Could you please try what is described here to have a bounding box set through inkscape : https://github.com/avianey/androidsvgdrawable-plugin#bounding-box
Your SVG is missing x
and y
attribute values for the <svg>
node...
Will unit test it when possible...
A added x and y attributes (which should default to "0" anyway) and also tried removing the "px" from width and height, but it did not change the output.
Actually I think you're bending the SVG spec somehow. According to the spec width
and height
on the SVG root element are called "viewport" (not "bounding box"), and there are no x
and y
parameters. What are you using them for?
Slight correction. The spec allows for x
and y
in the SVG root element, but it says "Has no meaning or effect on outermost svg elements." Also: "If the attribute is not specified, the effect is as if a value of '0' were specified."
Thanks for the quick fix! I just checked and it now works as expected.
still a little glitch in the test to fix for the oracle jdk... by the way it shows that batik does not generate exactly the same png when using oracle jdk or open jdk... but the eye wont see the difference
This SVG creates just a transparent image – I'd expect a grey600 'H' and a grey600 circle around it. I cross-tested generation with batik-rasterizer.jar 1.7.1 and 1.8 – both render the SVG as expected.
FWIW, the filename is "ic_oeffi_stations_grey600_36dp-hdpi.svg".