mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
lottie: Fixed a regression in masking logic
The scene tree should be arranged prior to appending the masking.
This was caused by 838785d75a
This commit is contained in:
parent
5e102dfd25
commit
713840eb42
1 changed files with 7 additions and 7 deletions
|
@ -1224,6 +1224,13 @@ void LottieBuilder::updateMaskings(LottieLayer* layer, float frameNo)
|
||||||
{
|
{
|
||||||
if (layer->masks.count == 0) return;
|
if (layer->masks.count == 0) return;
|
||||||
|
|
||||||
|
//Introduce an intermediate scene for embracing the matte + masking
|
||||||
|
if (layer->matteTarget) {
|
||||||
|
auto scene = Scene::gen();
|
||||||
|
scene->push(layer->scene);
|
||||||
|
layer->scene = scene;
|
||||||
|
}
|
||||||
|
|
||||||
Shape* pShape = nullptr;
|
Shape* pShape = nullptr;
|
||||||
MaskMethod pMethod;
|
MaskMethod pMethod;
|
||||||
uint8_t pOpacity;
|
uint8_t pOpacity;
|
||||||
|
@ -1277,13 +1284,6 @@ void LottieBuilder::updateMaskings(LottieLayer* layer, float frameNo)
|
||||||
pOpacity = opacity;
|
pOpacity = opacity;
|
||||||
pMethod = method;
|
pMethod = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Introduce an intermediate scene for embracing the matte + masking
|
|
||||||
if (layer->matteTarget) {
|
|
||||||
auto scene = Scene::gen();
|
|
||||||
scene->push(layer->scene);
|
|
||||||
layer->scene = scene;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue