/** * Determines the transformation needed to get the cached image to scale & position properly. Sets * x and y attributes on the element accordingly. */ protected AffineTransform handleTransform( Element imageElement, double x, double y, double srcWidth, double srcHeight, double dstWidth, double dstHeight, SVGGeneratorContext generatorContext) { // In this the default case, <image> element, we just // set x, y, width and height attributes. // No additional transform is necessary. imageElement.setAttributeNS(null, SVG_X_ATTRIBUTE, generatorContext.doubleString(x)); imageElement.setAttributeNS(null, SVG_Y_ATTRIBUTE, generatorContext.doubleString(y)); imageElement.setAttributeNS(null, SVG_WIDTH_ATTRIBUTE, generatorContext.doubleString(dstWidth)); imageElement.setAttributeNS( null, SVG_HEIGHT_ATTRIBUTE, generatorContext.doubleString(dstHeight)); return null; }