mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-12 15:34:22 +00:00
lottie/builder: enable layer blending
Issue: https://github.com/thorvg/thorvg/issues/1737
This commit is contained in:
parent
db55481e97
commit
c77ef98fef
3 changed files with 6 additions and 1 deletions
1
src/examples/images/guitar.json
Normal file
1
src/examples/images/guitar.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -965,6 +965,11 @@ static void _updateLayer(LottieLayer* root, LottieLayer* layer, float frameNo, b
|
||||||
//the given matte source was composited by the target earlier.
|
//the given matte source was composited by the target earlier.
|
||||||
if (!layer->matteSrc) root->scene->push(cast(layer->scene));
|
if (!layer->matteSrc) root->scene->push(cast(layer->scene));
|
||||||
|
|
||||||
|
//Apply a layer blending mode
|
||||||
|
if (layer->blendMethod != BlendMethod::Normal) {
|
||||||
|
layer->scene->blend(layer->blendMethod);
|
||||||
|
}
|
||||||
|
|
||||||
//cache this static layer scene
|
//cache this static layer scene
|
||||||
if (cache) {
|
if (cache) {
|
||||||
//TODO: remove duplicate, share the scene.
|
//TODO: remove duplicate, share the scene.
|
||||||
|
|
Loading…
Add table
Reference in a new issue