From ebc6577274998c5d73bb8bdce1f380eadbcbba54 Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Wed, 5 Dec 2018 18:37:44 +0900 Subject: [PATCH] lottie: Test for zero dash length after applying scale factor. the scale factor can be less which will make the dash to 0 again. Change-Id: I2aacaa342a09f010835c23beb7c2e476c2b11825 --- src/lottie/lottieitem.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lottie/lottieitem.cpp b/src/lottie/lottieitem.cpp index 64d15fa..766a174 100644 --- a/src/lottie/lottieitem.cpp +++ b/src/lottie/lottieitem.cpp @@ -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); } } -- 2.34.1