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
This commit is contained in:
subhransu mohanty 2018-12-05 18:37:44 +09:00
parent d7fd9124a7
commit ebc6577274

View 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);
}
}