Skip to content

Commit ddbc9dc

Browse files
JSUYAhermet
authored andcommitted
rlottie/capi: Add missing multiply for Path
mPath is std::vector array of VPointF as a VPath type. Since the list of points is passed to the capi structure as a float*, the size of the capi point list is twice the length of the vector array.
1 parent c0e16e5 commit ddbc9dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/lottie/lottieitem_capi.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void renderer::Layer::buildLayerNode()
121121
auto ptPtr = reinterpret_cast<const float *>(pts.data());
122122
auto elmPtr = reinterpret_cast<const char *>(elm.data());
123123
cNode.mPath.ptPtr = ptPtr;
124-
cNode.mPath.ptCount = pts.size();
124+
cNode.mPath.ptCount = 2 * pts.size();
125125
cNode.mPath.elmPtr = elmPtr;
126126
cNode.mPath.elmCount = elm.size();
127127
cNode.mAlpha = uchar(mask.mCombinedAlpha * 255.0f);

0 commit comments

Comments
 (0)