Fixed image rendering in SVG renderer

This commit is contained in:
Paolo 2012-04-17 10:58:14 +02:00
parent 8d965029da
commit cfc45e4f6e

View File

@ -135,10 +135,10 @@ _html2canvas.Renderer.SVG = function( options ) {
el = doc.createElementNS(svgNS, "image"); el = doc.createElementNS(svgNS, "image");
el.setAttributeNS(xlinkNS, "xlink:href", renderItem['arguments'][0].src); el.setAttributeNS(xlinkNS, "xlink:href", renderItem['arguments'][0].src);
el.setAttribute("width", renderItem['arguments'][0].width); el.setAttribute("width", renderItem['arguments'][7]);
el.setAttribute("height", renderItem['arguments'][0].height); el.setAttribute("height", renderItem['arguments'][8]);
el.setAttribute("x", renderItem['arguments'][5] - renderItem['arguments'][1]); el.setAttribute("x", renderItem['arguments'][5]);
el.setAttribute("y", renderItem['arguments'][6] - renderItem['arguments'][2]); el.setAttribute("y", renderItem['arguments'][6]);
el.setAttribute("clip-path", "url(#clipId" + clipId + ")"); el.setAttribute("clip-path", "url(#clipId" + clipId + ")");
// el.setAttribute("xlink:href", ); // el.setAttribute("xlink:href", );