Commit graph

8 commits

Author SHA1 Message Date
Hermet Park
f42559e613 lottie/slot: revise gradient fill support
Revise gradient fill data parsing by adding support
for the color stop count (p) parameter in slot data.

issue: https://github.com/thorvg/thorvg/issues/2795
2024-11-08 12:46:03 +09:00
Hermet Park
4345d6b8a5 API: revise the APIs.
deprecate the `identifier()` APIs by replacing them with `type()`.

ThorVG is going to introduce an instance `id()`,
and this could be confused with the `identifier()` methods.

with this new type() method can reduce the memory size
by removing unncessary type data.

New Experimental C APIs:
- enum Tvg_Type
- Tvg_Result tvg_paint_get_type(const Tvg_Paint* paint, Tvg_Type* type)
- Tvg_Result tvg_gradient_get_type(const Tvg_Gradient* grad, Tvg_Type* type)

New Experimental C++ APIs:
- Type Paint::type() const
- Type Fill::type() const
- Type LinearGradient::type() const
- Type RadialGradient::type() const
- Type Shape::type() const
- Type Scene::type() const
- Type Picture::type() const
- Type Text::type() const

Deprecated C APIs:
- enum Tvg_Identifier
- Tvg_Result tvg_paint_get_identifier(const Tvg_Paint* paint, Tvg_Identifier* identifier)
- Tvg_Result tvg_gradient_get_identifier(const Tvg_Gradient* grad, Tvg_Identifier* identifier)

Deprecated C++ APIs:
- enum class Type
- uint32_t Paint::identifier() const
- uint32_t Fill::identifier() const
- static uint32_t Picture::identifier()
- static uint32_t Scene::identifier()
- static uint32_t Shape::identifier()
- static uint32_t LinearGradient:identifier()
- static uint32_T RadialGradient::identfier()

Removed Experimental APIs:
- static uint32_t Text::identifier()

issue: https://github.com/thorvg/thorvg/issues/1372
2024-09-30 12:55:16 +09:00
Jinny You
f000d9f766 test/lottie: added the slot resetting in animated property case 2024-06-24 14:18:59 +09:00
Hermet Park
374e4ab82f test: corrected wrong implementation.
identifier should have been methods.
2024-06-24 12:35:17 +09:00
Mira Grudzinska
548a201b93 build: add missing ifdef
The thorvg_lottie.h file wasn’t accessible
if the lottie loader was not activated,
causing a compilation error.
2024-06-24 12:18:10 +09:00
Jinny You
22513b2fea test/lottie: Add the segment use case 2024-06-24 12:05:34 +09:00
Jinny You
62e7f0a7c6 test/lottie: added the slot resetting use case 2024-04-06 12:08:23 +09:00
Jinny You
fb20938b14 test: Added test code for the lottie slot
This patch adds the test case for the recently introduced lottie slot API.

@Issues: https://github.com/thorvg/thorvg/issues/2029
2024-04-06 12:08:21 +09:00