mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-09 07:41:40 +00:00
lottie: Process Dash info inside lottie library.
Change-Id: I7ecec5a94db20b81d0fbb9f620f3eef845b1aaa0
This commit is contained in:
parent
99aa016f84
commit
6aaa82628f
@ -1211,6 +1211,10 @@ void LOTDrawable::sync()
|
|||||||
if (mFlag & DirtyState::None) return;
|
if (mFlag & DirtyState::None) return;
|
||||||
|
|
||||||
if (mFlag & DirtyState::Path) {
|
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<VPath::Element> &elm = mPath.elements();
|
||||||
const std::vector<VPointF> & pts = mPath.points();
|
const std::vector<VPointF> & pts = mPath.points();
|
||||||
const float *ptPtr = reinterpret_cast<const float *>(pts.data());
|
const float *ptPtr = reinterpret_cast<const float *>(pts.data());
|
||||||
@ -1256,10 +1260,6 @@ void LOTDrawable::sync()
|
|||||||
mCNode->mStroke.join = LOTJoinStyle::JoinMiter;
|
mCNode->mStroke.join = LOTJoinStyle::JoinMiter;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
mCNode->mStroke.dashArray = mStroke.mDash.data();
|
|
||||||
mCNode->mStroke.dashArraySize = mStroke.mDash.size();
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
mCNode->mStroke.enable = 0;
|
mCNode->mStroke.enable = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user