generator.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
generator.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);
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());