diff options
author | Rohan Kumar <rohankanojia420@gmail.com> | 2017-03-14 20:00:16 +0530 |
---|---|---|
committer | Marco Cecchetti <marco.cecchetti@collabora.com> | 2017-04-07 17:04:46 +0200 |
commit | c68cc00c39b68a299f7d6d2445f3780d7290e432 (patch) | |
tree | 4bbe62b5ca0a85ddf9ab6a5bae79e30a2051dd30 /filter | |
parent | 3cced87438236e1ced6eb60cd4f40ac92b31c663 (diff) |
Fixed my mistake: fix flipOnYAxis for SVGPathElement
Fix flipOnYAxis() method which was the cause of some SnakeWipePath
transition subtypes not working.
Change-Id: I1bea5bdddf6c6312384f59d8614a0a2bc1a6e3ba
Reviewed-on: https://gerrit.libreoffice.org/35191
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'filter')
-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 eaee72509a51..292677d797ce 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -4558,12 +4558,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. |