Hi Samuel, not at home to give exact code but color and label have a diferent namespace, you need xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" they are inkscape:color inkscape:label, similar to: {http://www.inkscape.org/namespaces/inkscape%7Dcolor {http://www.inkscape.org/namespaces/inkscape%7Dlabel Regards, Jabier.
On Wed, 2015-02-18 at 12:59 +0100, Samuel Dellicour wrote:
I have build some extensions that generate guides (like guides in a grid with columns and gutters - available here: https://github.com/sambody/inkscape-guide-tools).
It works fine, but now that Inkscape 0.91 is out with the ability to change the color (and label) of an existing guide by hand, I had the following question: When I generate a guide in an extension, can I define the color (and label) of the guide when generating ? If yes, how?
I'm using a code like this : inkex.etree.SubElement(parent,'{ http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd%7Dguide ',{'position':position,'orientation':orientation})
I tried with just using 'color':'#ff0000ff' as extra parameter, but that didn't work.
If setting the color is possible, I could let the user choose a color for the generated guides, different from their default guide color.
Thanks.
Samuel
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.cl... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel