You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Michael Jurke <ju...@zedat.fu-berlin.de> on 2010/06/09 12:30:15 UTC
Generate AWT shapes
Hi,
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?
And is there also a possibilty to generade a Shape from a single
SVGElement? How and how are children handled?
Any ideas or suggestions?
Thanks a lot
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Generate AWT shapes
Posted by th...@kodak.com.
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.