Element img1 = document.createElementNS(svgNS,
"image");img1.setAttributeNS(xlinkNS,
"xlink:href", uri[statut-1]);img1.setAttributeNS(
null, "x", "0");img1.setAttributeNS(
null, "y", "0");img1.setAttributeNS(
null, "width", "300px");img1.setAttributeNS(
null, "height", "25px");Element svgslice = document.createElementNS(svgNS,
"svg");svgslice.setAttributeNS(
null, "preserveAspectRatio", "xMinYMin slice");svgslice.setAttributeNS(
null, "viewBox", "0 0 "+width+" "+height);svgslice.setAttributeNS(
null, "width", width+"");svgslice.setAttributeNS(
null, "height", height+"");Element gtransf = document.createElement(
"g");gtransf.setAttributeNS(
null, "transform", "translate("+x+","+y+")");svgslice.appendChild(img1);
gtransf.appendChild(svgslice);
treeManager.appendGroup(gtransf,
null);And i try createElementNS for my transform. When i stream to file, it generate :
<g transform="translate(210,397)">
<svg height="20" preserveAspectRatio="xMinYMin slice" viewBox="0 0 49 20" width="49">
<image height="25px" width="300px" x="0" xlink:href=""file://images/motifBlanc.jpg">file://images/motifBlanc.jpg" y="0" />
</svg>
</g>
thanks,
Ben
Post your free ad now! Yahoo! Canada Personals