Commit graph

14 commits

Author SHA1 Message Date
Hermet Park
26e04611e6 infra: move the examples folder outside of the source directory.
examples are not considered a feature of ThorVG;
hence, they are excluded from the src directory.

This change allows developers to concentrate more effectively
on the core ThorVG sources for practical usages.
2024-04-06 12:48:27 +09:00
Hermet Park
3dbe535f38 examples: refactored the examples directory
reorganized the resources folder,
distributing contents into categorized subfolders:
SVG, Lottie, Image, Font, and TVG.
2024-04-06 12:08:22 +09:00
Hermet Park
5d10e514d7 renderer/gl_engine: Refine GlCanvas Interface
Refactor the GlCanvas::target() interface to allow
passing the drawing target ID from the user side.

Previously, it performed the drawing on the currently set FBO target.

Beta API change:

Result GlCanvas::target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t h)
-> Result GlCanvas::target(int32_t id, uint32_t w, uint32_t h)
2024-04-06 12:08:21 +09:00
Hermet Park
f03cff2353 examples: ++threading stability.
Ensure synchronous calls are made after updating the canvases.
2024-04-06 12:08:21 +09:00
Hermet Park
ed55c04a26 examples: revise the usage.
Remove the canvas buffer clear call
when the solid bg is introduced.
2024-04-05 17:28:08 +09:00
Hermet Park
4ebbd0aefc examples: ++safety.
Guarantee the resource free at the termination.
2024-01-02 20:34:12 +09:00
Jinny You
92288c8291 updated copyright date (#1866) 2024-01-02 20:34:12 +09:00
Hermet Park
5401b1ae2e examples: show users the best practice usage. 2023-12-26 18:24:04 +09:00
Hermet Park
0832a188fe animation/lottie: updated the frame count unit.
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
2023-12-26 17:51:53 +09:00
Hermet Park
1b15233aeb api: enhance the API usage.
Allow users to omit the default type casting for added convenience.
2023-12-26 17:50:36 +09:00
Hermet Park
84a19ece7e examples: allow gl test 2023-12-26 17:48:50 +09:00
Hermet Park
86467481d1 examples: do not update canvases when frame numbers haven't been changed. 2023-08-29 13:24:59 +09:00
Hermet Park
5c45e64b93 examples: use tvg::cast(). 2023-07-27 17:53:12 +09:00
Hermet Park
739bb63f92 examples animation: adds a basic example. 2023-07-27 00:31:27 +09:00