}
} else if (node instanceof SVGNode) {
SVGNode svg = (SVGNode)node;
+ AffineTransform at = svg.getTransform();
+ if (!at.isIdentity()) {
+ if(at.getScaleX() == 1.0 && at.getScaleY() == 1.0 && at.getShearX() == 0.0 && at.getShearY() == 0.0) {
+ String m = "translate(" + at.getTranslateX() + " " + at.getTranslateY() + ")";
+ parentBuilder.append(MAIN_SECTION, "\n<g transform=\"" + m + "\">");
+ } else {
+ double[] ds = new double[6];
+ at.getMatrix(ds);
+ String m = "matrix(" + ds[0] + " " + ds[1] + " " + ds[2] + " " + ds[3] + " " + ds[4] + " " + ds[5] + ")";
+ parentBuilder.append(MAIN_SECTION, "\n<g transform=\"" + m + "\">");
+ }
+ }
parentBuilder.append(MAIN_SECTION, svg.getSVGText());
+ if (!at.isIdentity()) {
+ parentBuilder.append(MAIN_SECTION, "\n</g>");
+ }
} else if (node instanceof G2DParentNode) {
AffineTransform at = node.getTransform();
if(node instanceof SingleElementNode) {