Allow direct updates to the paint object without prior validation.
The verification process is deemed inefficient;
users are expected to ensure the paint is updated using a canvas
that contains it.
This might break the backward compatibility.
dispose of the resources at the end of the paint deletion.
This will help retain the resources of the retained paints
and reuse them after reconstructing the next scene.
replace the frame count unit from the int32_t to float
since animations could smoothly interpolate key-frames.
This notificably improve the animation smoothness in Lottie
Beta API changes:
Result Animation::frame(uint32_t no) -> Result Animation::frame(float no)
uint32_t Animation::curFrame() const -> float Animation::curFrame() const
uint32_t Animation::totalFrame() const -> float Animation::totalFrame() const
We've changed the behavior of Canvas::clear(false).
The canvas::clear(false) now retains the paints, allowing the user to update the next frame
more easily without having to recompose the paint list.
Previously, clear(false) removed the paint list from the canvas,
requiring the user to re-push all of them in the next frame.
Now, we offer the Canvas::paints() API, allowing users to modify the paint list directly instead.
This change will break compatibility with previous versions of Canvas.
Therefore, this update is included in ThorVG 1.0.
@Issue: https://github.com/thorvg/thorvg/issues/1372
These new apis would enable users to easily modify the motion scene,
The data structure of the paints has been changed from an array to a list.
@APIs:
std::list<Paint*>& Canvas::paints() noexcept;
std::list<Paint*>& Scene::paints() noexcept;
@Deprecated:
Result Canvas::reserve(uint32_t size) noexcept;
Result Scene::reserve(uint32_t size) noexcept;
@Issue: https://github.com/thorvg/thorvg/issues/1203
Rule of thumb on Windows:
* for a DLL:
* if the library is built, set TVG_API to __declspec(dllexport)
* if the library is used, set TVG_API to __declspec(dllimport)
* for a static library, set TVG_API to nothing
To set TVG_API for a static library, TVG_STATIC is defined when the stataic library is built.
Otherwise, TVG_API is correctly set for a DLL.
Also sun and intel compilers are handled
@issue: https://github.com/thorvg/thorvg/issues/1446
The previous meson script was incomplete,
therefore this change requires it to be revised.
To enable static linking use the next meson option.
"-Ddefault_library=static"
Issue: https://github.com/thorvg/thorvg/issues/1234