Hi Micahel, Michael Jurke <ju...@zedat.fu-berlin.de> wrote on 06/09/2010 06:30:15 AM:
> with the SVGShape utility class I can generate SVGElements from AWT shapes. > Is there also a possibility to traverse an SVGDocument, generate and > iterate through the shapes? (and ignore other elements or rather print > some debug info) For sure GVTTreeBuilder can be used somehow - anyone > has an idea or examples? This is the primary purpose of the entire Bridge and GVT packages in Batik. You can take a look at the 'Boot SVG and CSS DOM' on the wiki: http://wiki.apache.org/xmlgraphics-batik/BootSvgAndCssDom > And is there also a possibilty to generade a Shape from a single > SVGElement? How and how are children handled? Simple SVG shapes become a ShapeNode in the GVT, groups become a CompositeGraphicsNode. You can walk that tree and do whatever you want. > Any ideas or suggestions? Such a simple approach will miss things like 'filters', the semantics of 'use' elements, 'image' elements, etc. Also of course dynamic content. Good luck.