//concatenating this value to the transform attribute
//value of each child of the element
String transformValue="";
NodeList childNodes=g.getChildNodes();
Node node=null;
Element element=null;
for(int i=0; i<childNodes.getLength(); i++){
node=childNodes.item(i);
if(node instanceof Element){
element=(Element)node;
//getting the transform attribute value
transformValue=element.getAttribute(transformAtt).trim();
//setting the new transform value
transformValue=mainTransformValue+transformValue;
element.setAttribute(transformAtt, transformValue);
}
}
}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In a svg file, when "transform =translate..." attribute is added in tag <g> it not works, while in glips graffiti 1.4 it works fine...
Thank you for the bug notice, the bug has been fixed.
do you can say me where is the bug and how can i solve it?
In the class "SVGDOMNormalizer", replace the "normalizeGroupNode(Element g)" method by this one :
public void normalizeGroupNode(Element g){
//getting the transform attribute value of the group element
String mainTransformValue=g.getAttribute(transformAtt).trim();
if(! mainTransformValue.equals("")){
mainTransformValue+=" ";
g.removeAttribute(transformAtt);
//concatenating this value to the transform attribute
//value of each child of the element
String transformValue="";
NodeList childNodes=g.getChildNodes();
Node node=null;
Element element=null;
for(int i=0; i<childNodes.getLength(); i++){
node=childNodes.item(i);
if(node instanceof Element){
element=(Element)node;
//getting the transform attribute value
transformValue=element.getAttribute(transformAtt).trim();
//setting the new transform value
transformValue=mainTransformValue+transformValue;
element.setAttribute(transformAtt, transformValue);
}
}
}
}