mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 21:53:41 +00:00
loader/lottie: fix a missing opacity propagation.
the propagated opacity size should be accumulated.
This commit is contained in:
parent
5298f338de
commit
00ab8c254d
1 changed files with 1 additions and 6 deletions
|
@ -168,7 +168,7 @@ static void _updateTransform(LottieTransform* transform, int32_t frameNo, Render
|
||||||
|
|
||||||
auto pmatrix = PP(ctx.propagator)->transform();
|
auto pmatrix = PP(ctx.propagator)->transform();
|
||||||
ctx.propagator->transform(pmatrix ? mathMultiply(pmatrix, &matrix) : matrix);
|
ctx.propagator->transform(pmatrix ? mathMultiply(pmatrix, &matrix) : matrix);
|
||||||
ctx.propagator->opacity(opacity);
|
ctx.propagator->opacity(MULTIPLY(opacity, PP(ctx.propagator)->opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -180,9 +180,6 @@ static void _updateGroup(LottieGroup* parent, LottieGroup* group, int32_t frameN
|
||||||
auto opacity = group->opacity(frameNo);
|
auto opacity = group->opacity(frameNo);
|
||||||
if (opacity == 0) return;
|
if (opacity == 0) return;
|
||||||
|
|
||||||
//TODO: move transform to layer.
|
|
||||||
if (group->transform) TVGERR("LOTTIE", "group transform is not working?!");
|
|
||||||
|
|
||||||
auto ctx2 = ctx;
|
auto ctx2 = ctx;
|
||||||
_updateChildren(group, frameNo, ctx2);
|
_updateChildren(group, frameNo, ctx2);
|
||||||
}
|
}
|
||||||
|
@ -942,8 +939,6 @@ void LottieBuilder::build(LottieComposition* comp)
|
||||||
|
|
||||||
_buildPrecomp(comp, comp->root);
|
_buildPrecomp(comp, comp->root);
|
||||||
|
|
||||||
//TODO: Process repeater objects?
|
|
||||||
|
|
||||||
if (!update(comp, 0)) return;
|
if (!update(comp, 0)) return;
|
||||||
|
|
||||||
//viewport clip
|
//viewport clip
|
||||||
|
|
Loading…
Add table
Reference in a new issue