Skip to content

Conversation

@ajorians
Copy link

Introduction

With a compiler option change I was unable to build:
image

I'm sure all that was missing was an include to functional. There is a chance this was already added so I am syncing our changes on top of the current changes:

Testing Notes

I plan on testing with a client and the tests on the client.

Hope that helps! 😃

mihashco and others added 13 commits May 22, 2023 18:47
This commit modifies the LottieItem rendering process to match Adobe
After Effects blending style. Initially, the entire content of the layer
is rendered to an intermediate buffer. Then, the buffer is rendered with
applied alpha layer.
use parent alpha in the Fill::updateContent method to calculate combined
alpha.
DotLottie is a new standard for the Lottie file format.
Essentially, it's a compilation of animations that encapsulates multiple Lottie animations into one zipped file.
More information on its structure can be found here:
https://dotlottie.io/structure/#dotlottie-structure

This implementation borrows certain elements from the unzipping functionality
found at https://github.com/kuba--/zip,
an open-source project distributed under the No License.

Tests have been carried out using the file '1st_animation.lottie'
located in the 'examples/resource' directory.
Revert "lottieitem: Added alpha in Fill::updateContent method."

This reverts commit fb12ddc8d0195672aa1ade6e181c8b26378ad10d.

Revert "Update color blending style in LottieItem"

This reverts commit 8cb666211b859267ec530ff8798c08c29aefecaf.

Change-Id: I27d3213b04514f6c60eb817aa924ca74103c5b09
In following cases,

```c++
animation->setValue<Property::FillColor>("**", red);
animation->render(0, surface);
// after render is finished
animation->setValue<Property::FillColor>("**", blue);
animation->render(0, surface);
```
Or
```c++
animation->setValue<Property::FillColor>("**", [&](const FrameInfo& info) {
    return colors->getColor();
});

colors->setColor(red);
animation->render(0, surface);
// after render is finished
colors->setColor(blue);
animation->render(0, surface);

```
the second render request for both cases should not be ignored even if it's the same request as previous.

Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
Change-Id: I1c2bc75078a22c105da496e1141d6f2d2e7794ae
Add support for replacing colors in a Lottie file.

This modifies the parser and the model code to support replaceable colors.  When a file is parsed all the unique colors found are stored in a color palette.  When the Lottie is rendered, the client can supply a vector of replacement colors that are applied on the fly.

Force a redraw when the colors change.

rlottie is fairly smart about only redrawing when necessary.  We have to explicitly force it to redraw when the colors change.

Make color replacement thread safe.
by removing exception disabling and not forcing c++14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants