Hello all. Currently I simply show a SVGDocument in a JSVGCanvas. Now I'm trying to modify the content of the tree e.g. by adding nodes or grouping nodes together... (later this should happen on user-iteraction, but for now I want to do it hard-coded just to see how it works)
I had some success by adding Nodes to the root-element of the SVGDocument itself (JSVGCanvas.getSVGDocument().getRootElement().appendChild(xxx) )but these changes are not shown in the canvas until the GVTTree is rebuilt which I would like to leave out... I guess it would do what I would like to get when I modify the SVGDocument-Object and then calling the JSVGCanvas.setSVGDocument(xxx)-Function but I assume this would rebuild the whole tree which would not be as interactive as I would like it to be... So is there a way to directly access and modify the tree that is finally rendered into the canvas? I tried to get to the JSVGCanvas.gvtroot (although I do not know yet, if this is the correct tree) but i could not find a way to access it... So now the questions... 1. Which is the tree-structure that is accessed by the Renderer and is there any way to modify it directly, so that the changes are visible without explicitly rebuilding the complete tree? 2. Is there any way to save these changes back to a SVG-file? This works perfectly when I modify the SVGDocument-Object, but if the rendering tree is modifyied I guess this will not be as easy, although it would be really nice if I'm wrong here ^^ So I hope somebody can help me here. Best Regards, Sven -- View this message in context: http://www.nabble.com/direct-access-to-tree-to-modify-a-shown-SVG-Document--tp24973683p24973683.html Sent from the Batik - Users mailing list archive at Nabble.com.
