Hi Sebastien,
Well I don't know most of the classes mentioned
in your example (what is Canvas? what is BufferDoc?).
The getRoot class should simply append the graphical content to
root (BTW it's possible that the document has no root element
which would mean that you are passing in null to getRoot in
which case I think getRoot would construct it's own root to
append to, which it returns - and you don't capture).
grillot sebastien wrote:
i want to out print my svg file (that is contain on my canvas) but
when i do this :
public static void main(String args[]) throws ClassNotFoundException {
Canvas aCanvas = new Canvas();
BufferDoc aDocBuffer = new BufferDoc(aCanvas.getDocument());
System.out.println(aDocBuffer.getBufferDoc(new Integer("0")));
SVGGraphics2D g = new SVGGraphics2D(aCanvas.getDocument());
Shape circle = new Ellipse2D.Double(0, 0, 50, 50);
g.setPaint(Color.BLUE);
g.fill(circle);
Element root =
aCanvas.getDocument().getDocumentElement();//doc.getRootElement();
g.getRoot(root);
aDocBuffer.setBufferDoc(aCanvas.getDocument());
//aDocBuffer.getBufferDoc() return a document
System.out.println(aDocBuffer.getBufferDoc(new Integer("0")));
}
i have this on my console :
[EMAIL PROTECTED]
[EMAIL PROTECTED]
but i want the dom tree (.... it's the good name ?)
Regards
seb
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]