I'm a new user of Batik, so excuse me if this is a common question.
I have a charting package that creates a chart with a JComponent.
I attempted to serialize the chart to SVG using the demo code on the
Batik svggen page.
----------------------
Chart ch = createChart(); // Chart extends JComponent
// Get a DOMImplementation
DOMImplementation domImpl =
GenericDOMImplementation.getDOMImplementation();
// Create an instance of org.w3c.dom.Document
Document document = domImpl.createDocument(null, "svg", null);
// Create an instance of the SVG Generator
SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
// Paints the Chart components
ch.paint(svgGenerator);
Writer out = new OutputStreamWriter(str, "UTF-8");
svgGenerator.stream(out, true);
-----------
My problem is that the SVG file that results is a base64 encoded PNG
wrapped in some simple SVG for embedding the bitmap. What am I doing
wrong that the JComponent is being rasterized instead of being written
out as XML object within the SVG?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]