mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 14:48:24 +00:00
lottie: fix precomposition with masking
A precomposition layer is clipped to its viewport. If the same layer also had a mask that was optimized using clipping, this clip was unintentionally overridden by the viewport clipping. This conflict is now fixed.
This commit is contained in:
parent
c597365b99
commit
a27839e80a
1 changed files with 2 additions and 2 deletions
|
@ -1248,8 +1248,8 @@ void LottieBuilder::updateMasks(LottieLayer* layer, float frameNo)
|
|||
{
|
||||
if (layer->masks.count == 0) return;
|
||||
|
||||
//Introduce an intermediate scene for embracing the matte + masking
|
||||
if (layer->matteTarget) {
|
||||
//Introduce an intermediate scene for embracing matte + masking or precomp clipping + masking replaced by clipping
|
||||
if (layer->matteTarget || layer->type == LottieLayer::Precomp) {
|
||||
auto scene = Scene::gen().release();
|
||||
scene->push(cast(layer->scene));
|
||||
layer->scene = scene;
|
||||
|
|
Loading…
Add table
Reference in a new issue