As an example: I am using the following code to create and add elements to the SVG document:
Document doc = svgCanvas.getSVGDocument(); String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI; // get the root element (the svg element) Element svgRoot = doc.getDocumentElement(); // create the rectangle Element ellipse = doc.createElementNS(svgNS, "ellipse"); ellipse.setAttributeNS(null, "cx", sx); ellipse.setAttributeNS(null, "cx", sy); ellipse.setAttributeNS(null, "rx", sw); ellipse.setAttributeNS(null, "ry", sh); ellipse.setAttributeNS(null, "style", "stroke:black; stroke-width:2"); //attach the rectangle to the svg root element svgRoot.appendChild(ellipse); While i know this to be a correct implementation, i was wondering where this leaves the SVGGraphics2D class. I presume adding elements in this way avoids utilising this class. Is this any better or worse? Does this mean (in this case) that the SVGGraphics2D svgGenerator is only used when writing SVGdocuments to file?? I am a little confused as to why there seems to be so many different ways of generating SVGcontent. Why is the SVGGraphics2D module dealt within such depth on the apache website if it is not even being used by many people. Sorry if this seems like a stupid question. Kind Regards --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]