generator.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
// Draw the image
view.drawShadow(generator);
view.drawDrawing(generator);
view.drawHandles(generator);
// Populate the document root with the generated SVG content.
generator.getRoot(svgDocument.getDocumentElement());
// Create the image