diff options
Diffstat (limited to 'filter/source/svg/presentation_engine.js')
-rw-r--r-- | filter/source/svg/presentation_engine.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 3a0f95b70ee8..33b958530c13 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -4572,12 +4572,22 @@ SVGPathElement.prototype.appendPath = function( aPath ) this.setAttribute( 'd', sPathData ); }; +/** flipOnYAxis + * Flips the SVG Path element along y-axis. + * + * @param aPath + * An object of type SVGPathElement to be flipped. + */ function flipOnYAxis( aPath ) { - var aMatrix = SVGIdentityMatrix.flipY().scaleNonUniform(-1, 1); - aPath.matrixTransform(aMatrix); - return aPath; + var aPolyPath = aPath.cloneNode(true); + var aTransform = document.documentElement.createSVGMatrix(); + aTransform.a = -1; + aTransform.e = 1; + aPolyPath.matrixTransform(aTransform); + return aPolyPath; } + /** SVGPathElement.matrixTransform * Apply the transformation defined by the passed matrix to the referenced * svg <path> element. |