My problem is that freehep only use a standard Graphics2D-enabled component (i.e. JComponent) to be able to export. Batik, however, only outputs images to it's custom JSVGCanvas, which is not directly compatible with freehep.
You can Load your SVG into a JSVGComponent, and once the GVTTree is build, you can get a TreeWalker to paint your graphics2D objects in whatever swing component you like.
JSVGComponent extends a JComponent, so it should work for you. I have a custom SVG to DXF converter that works in the following manner:
I load my SVG into a JSVGComponent, and i register a listener to wait for a gvtTreeBuildCompleted event. Once this event is called, i create a GVTTreeWalker, that holds all the SVG objects converted into Graphics2D representations.
I then walk the GVTTree to parse all the Graphics 2D objects into DXF.
Another idea:
You may want to implement the actions done by the "org.apache.batik.gvt.GraphicsNode" in a custom JComponent of yours to paint() your graphics2D content into your exporter. You can then simply "paint()" the gvtRoot.
Andres.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]