From cfc45e4f6e734117fd631ea0ad2080576b15f2aa Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 17 Apr 2012 10:58:14 +0200 Subject: [PATCH] Fixed image rendering in SVG renderer --- src/renderers/SVG.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderers/SVG.js b/src/renderers/SVG.js index eb4a8f1..cc34da3 100644 --- a/src/renderers/SVG.js +++ b/src/renderers/SVG.js @@ -135,10 +135,10 @@ _html2canvas.Renderer.SVG = function( options ) { el = doc.createElementNS(svgNS, "image"); el.setAttributeNS(xlinkNS, "xlink:href", renderItem['arguments'][0].src); - el.setAttribute("width", renderItem['arguments'][0].width); - el.setAttribute("height", renderItem['arguments'][0].height); - el.setAttribute("x", renderItem['arguments'][5] - renderItem['arguments'][1]); - el.setAttribute("y", renderItem['arguments'][6] - renderItem['arguments'][2]); + el.setAttribute("width", renderItem['arguments'][7]); + el.setAttribute("height", renderItem['arguments'][8]); + el.setAttribute("x", renderItem['arguments'][5]); + el.setAttribute("y", renderItem['arguments'][6]); el.setAttribute("clip-path", "url(#clipId" + clipId + ")"); // el.setAttribute("xlink:href", );