I use Inkscape as a UI designer. I want to export each group as a single SVG using the python parser and Inkscape command line renderer but I have problems with the coordinates of each object.
For example I have a group which is a complete window. Inside this group we have another group (for example the close button) that includes a path, a rectangle and an ellipse.
And the parser create tree of folders depending on <g></g>
.
When the parser "sees" the <g></g>
then it creates a folder named <group ID>
and goes deeper until it encounters <g root_img="true"></g>
. Everything between <g....></g>
is treated as separate SVG and calls Inkscape command line to render it, and save it as *<group ID>*.png
.
This is what I have.
[folder]Window
[image]close_btn.png
[image]title_bar.png
[folder]Products_list
[image]product_belt1.png
[image]product_belt3.png
[image]product_belt2.png
[folder]Advanced_options_window
[image]hide_btn.png
[image]title_aow_bar.png
[folder]Options
[image]opt1.png
[image]opt2.png
[image]opt3.png
I want the coordidnates values, for instance:
close_btn 1250, 10
title_bar 0, 0
product_belt1.png 150, 150
But how do I get the absolute coordinates of each group?
EDIT: It is possible to make a plug-in which I add additional arguments[x=150, y=120] to all groups in XML?