lottie: Test for zero dash length after applying scale factor. 31/194531/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Wed, 5 Dec 2018 09:37:44 +0000 (18:37 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Wed, 5 Dec 2018 09:37:44 +0000 (18:37 +0900)
the scale factor can be less which will make the dash to 0 again.

Change-Id: I2aacaa342a09f010835c23beb7c2e476c2b11825

src/lottie/lottieitem.cpp

index 64d15fa..766a174 100644 (file)
@@ -999,11 +999,12 @@ void LOTStrokeItem::updateRenderNode()
     mDrawable->setStrokeInfo(mCap, mJoin, mMiterLimit,
                             mWidth * scale);
     if (mDashArraySize) {
-        /* AE draw the dash even if dash value is 0 */
-        if (vCompare(mDashArray[0], 0.0f)) mDashArray[0]= 0.2;
-
         for (int i = 0 ; i < mDashArraySize ; i++)
             mDashArray[i] *= scale;
+
+        /* AE draw the dash even if dash value is 0 */
+        if (vCompare(mDashArray[0], 0.0f)) mDashArray[0]= 0.1;
+
         mDrawable->setDashInfo(mDashArray, mDashArraySize);
     }
 }