mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
lottie: fix a regression bug of masking
InverseAlphaMasking should be applied as intended,
but it was mistakenly reverted to alpha.
regression in v0.14.0 by: 2c7a83406e
This commit is contained in:
parent
938d775ae5
commit
64a0b84d71
1 changed files with 6 additions and 1 deletions
|
@ -1145,7 +1145,12 @@ static void _updateMaskings(LottieLayer* layer, float frameNo, LottieExpressions
|
||||||
if (pMask->pathset(frameNo, P(pShape)->rs.path.cmds, P(pShape)->rs.path.pts, nullptr, 0.0f, exps)) {
|
if (pMask->pathset(frameNo, P(pShape)->rs.path.cmds, P(pShape)->rs.path.pts, nullptr, 0.0f, exps)) {
|
||||||
P(pShape)->update(RenderUpdateFlag::Path);
|
P(pShape)->update(RenderUpdateFlag::Path);
|
||||||
}
|
}
|
||||||
layer->scene->composite(tvg::cast(pShape), (pMethod == CompositeMethod::SubtractMask) ? CompositeMethod::InvAlphaMask : CompositeMethod::AlphaMask);
|
|
||||||
|
if (pMethod == CompositeMethod::SubtractMask || pMethod == CompositeMethod::InvAlphaMask) {
|
||||||
|
layer->scene->composite(tvg::cast(pShape), CompositeMethod::InvAlphaMask);
|
||||||
|
} else {
|
||||||
|
layer->scene->composite(tvg::cast(pShape), CompositeMethod::AlphaMask);
|
||||||
|
}
|
||||||
|
|
||||||
//Apply the subsquent masks
|
//Apply the subsquent masks
|
||||||
for (auto m = layer->masks.begin() + 1; m < layer->masks.end(); ++m) {
|
for (auto m = layer->masks.begin() + 1; m < layer->masks.end(); ++m) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue