Rectangle2D r = CSSUtilities.convertEnableBackground(e);
if (r != null) {
result.setBackgroundEnable(r);
}
SVGSVGElement svgElement = imgDocument.getRootElement();
GVTBuilder builder = new GVTBuilder();
GraphicsNode node = builder.build(ctx, imgDocument);
// HACK: remove the clip set by the SVGSVGElement as the overflow
// and clip properties must be ignored. The clip will be set later
// using the overflow and clip of the <image> element.
node.setClip(null);
result.getChildren().add(node);
// create the implicit viewBox for the SVG image. The viewBox
// for a SVG image is the viewBox of the outermost SVG element
// of the SVG file
String viewBox =
svgElement.getAttributeNS(null, SVG_VIEW_BOX_ATTRIBUTE);
float [] vb = ViewBox.parseViewBoxAttribute(e, viewBox);
// handles the 'preserveAspectRatio', 'overflow' and 'clip' and sets
// the appropriate AffineTransform to the image node