Le vendredi 17 juin 2011 à 08:20 +0200, joakim@...1974... a écrit :
Jon Cruz <jon@...18...> writes:
On Jun 16, 2011, at 10:31 AM, Thibaut Girka wrote:
Hi, I'm using inkscape for various projects, and I'm now concerned about automatically rendering graphics for my game project.
However, several images are rendered from the same SVG file, with different layers/objects visibles. While --export-id (and --export-id-only) is helpful in some cases, it's not always sufficient.
Therefore, I think hiding certain objects with a new command-line option such as --hide-id would be a worthy improvement. Allowing multiple --export-id might be useful too.
There is a simple alternative, especially if you are running things from the command line.
Since SVG files are just XML, it's usually fairly simple to create XSLT to run over the SVG and tweak the specific results the way you need them.
So you start with a "source" SVG that has different items set with specific id's and/or on specific layers.
For each pass, use XSLT to create a temporary SVG with the items you want toggled visible or not.
Then take that temporary SVG and export to bitmap from that.
Eventually it might be handy to add some such batch export support to Inkscape, but it is very much within the realm of common command-line work.
Since I've been using the DBUS interfare for similar things I'd like to suggest that approach.
Doesn't it require a running inkscape instance (possibly requiring a X connection itself)?