mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-27 08:36:59 +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
b59c7a0bee
commit
e0588d39f0
1 changed files with 8 additions and 8 deletions
|
@ -1227,7 +1227,14 @@ void LottieBuilder::updateText(LottieLayer* layer, float frameNo)
|
||||||
|
|
||||||
void LottieBuilder::updateMaskings(LottieLayer* layer, float frameNo)
|
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().release();
|
||||||
|
scene->push(cast(layer->scene));
|
||||||
|
layer->scene = scene;
|
||||||
|
}
|
||||||
|
|
||||||
Shape* pShape = nullptr;
|
Shape* pShape = nullptr;
|
||||||
CompositeMethod pMethod;
|
CompositeMethod pMethod;
|
||||||
|
@ -1282,13 +1289,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().release();
|
|
||||||
scene->push(cast(layer->scene));
|
|
||||||
layer->scene = scene;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue