Hi,
I have started to use batik it is a great tool!!!
I ran into a nullpointer exception in SVGGeneratorContext.doubleString with simple
code like:
public void createSVG(OutputStream out) throws IOException
{ // 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);
//svgGenerator.getGeneratorContext().setPrecision(4);
draw(svgGenerator);
svgGenerator.stream(new OutputStreamWriter(out, "UTF-8"), true);
}
and finaly figured out that I had to add a line like:
svgGenerator.getGeneratorContext().setPrecision(4);
I think it would be a good idea to have a call to setPrecision in
SVGGeneratorContext.createDefault because that would prevent the exception.
Alberto
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]