[Libreoffice-commits] core.git: filter/source

Rohan Kumar rohankanojia420 at gmail.com
Mon Mar 6 14:59:39 UTC 2017


 filter/source/svg/presentation_engine.js |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 74b54e33135bb99513142e671369e4f3f6370d55
Author: Rohan Kumar <rohankanojia420 at gmail.com>
Date:   Fri Feb 3 01:56:42 2017 +0530

    tdf#51358 Importing ClockWipe in SVG engine
    
    Most of the constants and transition info table were already
    written, i just added the perform method.
    
    Change-Id: Ib8e2d8e7ca7e26dc54a1e309a2b6271ee7603f34
    Reviewed-on: https://gerrit.libreoffice.org/33847
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js
index b5ca5d7..801da82 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -9376,6 +9376,8 @@ function createClipPolyPolygon( nType, nSubtype )
                     return null;
             }
             return new PinWheelWipePath( nBlades );
+        case CLOCKWIPE_TRANSITION:
+            return new ClockWipePath();
         case RANDOMBARWIPE_TRANSITION:
             return new RandomWipePath( 128, true /* bars */ );
         case CHECKERBOARDWIPE_TRANSITION:
@@ -9618,7 +9620,19 @@ EllipseWipePath.prototype.perform = function( nT )
 };
 
 
+/**
+ * Class ClockWipePath
+ *
+ */
+function ClockWipePath() { }
 
+ClockWipePath.prototype.perform = function( nT ) {
+    const aTransform = SVGIdentityMatrix.scaleNonUniform(0.5, 0.5).translate(0.5, 0.5);
+    var aPolyPath = PinWheelWipePath.calcCenteredClock(nT, 1.0);
+    aPolyPath.matrixTransform( aTransform );
+
+    return aPolyPath;
+}
 
 /** Class PinWheelWipePath
  *  This class handles a parametric poly-path that is used for performing


More information about the Libreoffice-commits mailing list