lottie: Fix the issue when dash length is 0. 18/194518/1
authorsubhransu mohanty <sub.mohanty@samsung.com>
Wed, 5 Dec 2018 08:08:05 +0000 (17:08 +0900)
committersubhransu mohanty <sub.mohanty@samsung.com>
Wed, 5 Dec 2018 08:08:05 +0000 (17:08 +0900)
AE can draw zero length dash.

Change-Id: I286e0a5503952f7e4ee38e3cc05c8ac3392f7579

src/lottie/lottieitem.cpp

index beea1b8..64d15fa 100644 (file)
@@ -999,6 +999,9 @@ 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;
         mDrawable->setDashInfo(mDashArray, mDashArraySize);