diff --git a/canvas2svg.js b/canvas2svg.js index 311acdd..9b55c0d 100644 --- a/canvas2svg.js +++ b/canvas2svg.js @@ -693,6 +693,9 @@ * Sets the stroke property on the current element */ ctx.prototype.stroke = function(){ + if(this.__currentElement.nodeName === "path") { + this.__currentElement.setAttribute("paint-order", "fill stroke markers"); + } this.__applyCurrentDefaultPath(); this.__applyStyleToCurrentElement("stroke"); }; @@ -701,6 +704,9 @@ * Sets fill properties on the current element */ ctx.prototype.fill = function(){ + if(this.__currentElement.nodeName === "path") { + this.__currentElement.setAttribute("paint-order", "stroke fill markers"); + } this.__applyCurrentDefaultPath(); this.__applyStyleToCurrentElement("fill"); };