Default bounding box should encompass entire drawing
When converting from SVG to SVG, the
rsvg-convert program should add a proper bounding box if the original SVG file lacked one. For example, consider this image,
<svg> <g> <ellipse ry="50" rx="50" cy="300" cx="300" /> </g> </svg>
rsvg-convert circle.svg -f svg outputs the following:
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100pt" height="100pt" viewBox="0 0 100 100" version="1.1"> <g id="surface3"> </g> </svg>
Note that rsvg-convert correctly detected the bounding box size to be 100x100, but it did not get the correct position. It should have translated the drawing to the center instead of cropping it out.