Hi,
I have few problems with SVGGraphics2D.
I want to create a SVG document, draw in it's graphics context, stream it out,
reset the graphic content, redraw, and so on.
Example:
DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation();
Document document = domImpl.createDocument(null, "svg", null);
SVGGraphics2D g = new SVGGraphics2D(document);
// draw graphics in g
// ...
FileWriter out = new FileWriter("/home/dominik/test.svg");
g.stream(out, false);
//...
g.dispose() //delete graphics content
// redraw graphics in g
//...
out = new FileWriter("/home/dominik/test2.svg");
g.stream(out, false);
There seem's to be a known bug in batik, so that streaming out results in a
corrupted document. So I tried the work-around:
Element e = document.getDocumentElement();
g.getRoot(e);
g.stream(root, out, false);
But this has the consequence that I cannot reset SVGGraphics2D, I can't delete
the graphics content. SVGGraphics2D.dispose() seems to have no effect.
How can I delete the graphics content of SVGGraphics2D? Is there a way for
doing this task?
Hope you can help me!
Thanks,
Dominik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]