support id based selective rendering
@jimmac
Submitted by Jakub Steiner Assigned to Emmanuel Pacaud @EmmanuelP
Link to original bug (#768134)
Description
I am quite impressed by the speed and rendering quality of lasem and would like to depend on lasem rather than Inkscape for our icon rendering.
To achieve that, we'd need lasem-render to support id based rendering in that only an object of the provided id would get rendered (hiding objects that would for example be below it, not ending up the final output canvas despite being in the bounding box of the object:
lasem-render -i g37565 input.svg output-object-g37565.png
That's the easy part, supported by rsvgs (although with rendering errors). The tricky part is what we would need for symbolic icons. Symbolic icons live in a single SVG sheet for easy editing and maintenance but are exported using a fairly awkward method using Inkscape verbs. In effect the behavior is the same as above, except the export isn't a bitmap, but and SVG itself. All other objects other than the one with the id provided is discarded and the canvas is set to match the bounding box of the object:
lasem-render -i g37565 input.svg output-object-g37565.svg
It isn't a trivial request, librsvg has failed to deliver on these promises:
bug #520654, initial testing done in the rsvg-cropping branch -- https://git.gnome.org/browse/adwaita-icon-theme/?h=wip%2Frsvg-cropping
Version: git master