mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
lottie: hotfix a regression
a regression by the code refactoring:
5b30e2ad65
This commit is contained in:
parent
eb4b286da5
commit
c5ca7b4b12
1 changed files with 2 additions and 1 deletions
|
@ -1177,6 +1177,7 @@ void LottieBuilder::updateMasks(LottieLayer* layer, float frameNo)
|
||||||
//the first mask
|
//the first mask
|
||||||
if (!pShape) {
|
if (!pShape) {
|
||||||
pShape = layer->pooling();
|
pShape = layer->pooling();
|
||||||
|
pShape->reset();
|
||||||
auto compMethod = (method == MaskMethod::Subtract || method == MaskMethod::InvAlpha) ? MaskMethod::InvAlpha : MaskMethod::Alpha;
|
auto compMethod = (method == MaskMethod::Subtract || method == MaskMethod::InvAlpha) ? MaskMethod::InvAlpha : MaskMethod::Alpha;
|
||||||
//Cheaper. Replace the masking with a clipper
|
//Cheaper. Replace the masking with a clipper
|
||||||
if (layer->masks.count == 1 && compMethod == MaskMethod::Alpha) {
|
if (layer->masks.count == 1 && compMethod == MaskMethod::Alpha) {
|
||||||
|
@ -1189,11 +1190,11 @@ void LottieBuilder::updateMasks(LottieLayer* layer, float frameNo)
|
||||||
//Chain mask composition
|
//Chain mask composition
|
||||||
} else if (pMethod != method || pOpacity != opacity || (method != MaskMethod::Subtract && method != MaskMethod::Difference)) {
|
} else if (pMethod != method || pOpacity != opacity || (method != MaskMethod::Subtract && method != MaskMethod::Difference)) {
|
||||||
auto shape = layer->pooling();
|
auto shape = layer->pooling();
|
||||||
|
shape->reset();
|
||||||
pShape->mask(shape, method);
|
pShape->mask(shape, method);
|
||||||
pShape = shape;
|
pShape = shape;
|
||||||
}
|
}
|
||||||
|
|
||||||
pShape->reset();
|
|
||||||
pShape->trimpath(0.0f, 1.0f);
|
pShape->trimpath(0.0f, 1.0f);
|
||||||
pShape->strokeWidth(0.0f);
|
pShape->strokeWidth(0.0f);
|
||||||
pShape->fill(255, 255, 255, opacity);
|
pShape->fill(255, 255, 255, opacity);
|
||||||
|
|
Loading…
Add table
Reference in a new issue