Hi Sebastian,
> When trying to add an id attribute to elements just created using
> SVGGraphics2D, all elements get deleted. This is caused by the method
> getRoot() which calls getRoot(null). But why?
I didn't investigate this properly before replying but, while taking a
glance at the documentation [1], it sounds like you may not be doing
the right thing (this snippet is from the "How to view the generated
SVG document" [2] section):
// Populate the document root with the generated SVG content.
Element root = doc.getDocumentElement();
g.getRoot(root);
Can you provide more information on your work flow (generating
graphics information, modifying, displaying, etc.) or a more detailed
code snippet?
Hope this helps,
Helder
[1] http://xmlgraphics.apache.org/batik/using/svg-generator.html
[2] http://xmlgraphics.apache.org/batik/using/svg-generator.html#view
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]