lottie: Process Dash info inside lottie library.

Change-Id: I7ecec5a94db20b81d0fbb9f620f3eef845b1aaa0
This commit is contained in:
subhransu mohanty 2018-12-10 14:58:19 +09:00 committed by Hermet Park
parent 99aa016f84
commit 6aaa82628f

View File

@ -1211,6 +1211,10 @@ void LOTDrawable::sync()
if (mFlag & DirtyState::None) return;
if (mFlag & DirtyState::Path) {
if (mStroke.mDash.size()) {
VDasher dasher(mStroke.mDash.data(), mStroke.mDash.size());
mPath = dasher.dashed(mPath);
}
const std::vector<VPath::Element> &elm = mPath.elements();
const std::vector<VPointF> & pts = mPath.points();
const float *ptPtr = reinterpret_cast<const float *>(pts.data());
@ -1256,10 +1260,6 @@ void LOTDrawable::sync()
mCNode->mStroke.join = LOTJoinStyle::JoinMiter;
break;
}
mCNode->mStroke.dashArray = mStroke.mDash.data();
mCNode->mStroke.dashArraySize = mStroke.mDash.size();
} else {
mCNode->mStroke.enable = 0;
}