Commit graph

50 commits

Author SHA1 Message Date
Hermet Park
d671f8637b lottie/expressions: ++coverage enhancement
Allow to access layer index globally.
2024-09-30 15:36:24 +09:00
Hermet Park
9749e7fea0 examples: updated lottie samples 2024-09-30 15:36:18 +09:00
Hermet Park
072ce383db examples: added more expressions samples 2024-09-30 15:36:11 +09:00
Hermet Park
0b66cd422e lottie/expressions: added a missing polystar property build. 2024-09-30 15:35:59 +09:00
Hermet Park
7e9febf2c6 examples: ++exception handling
Added handling for engine initialization failure.
2024-09-30 15:34:48 +09:00
Hermet Park
ec00238aed examples: added LottieExpressions 2024-09-30 15:31:55 +09:00
Hermet Park
3d9f7ebbc3 examples: updated lottie samples 2024-09-30 15:30:12 +09:00
Hermet Park
f49bf9e775 examples: added svg samples 2024-09-30 15:29:22 +09:00
Hermet Park
2a6a221b6c example: print non support webgpu msg properly. 2024-09-30 15:20:31 +09:00
Hermet Park
1d7bf0d9a2 example: ++ DirectUpdate to cover more scenarios. 2024-09-30 15:11:16 +09:00
Hermet Park
d8a8f1a01f example: improved to print proper fail msgs. 2024-09-30 13:00:12 +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
Sergii Liebodkin
9b638ea470 examples: fix surface refresh approuchfor webgpu
Move surface refresh approach from engine side to user size.
2024-09-30 12:51:09 +09:00
Josh Soref
e3c66db301 common: fix 178+ spelling errors 2024-09-30 12:41:38 +09:00
Hermet Park
6f0ae1cd3f example: do not scan a given resource folder recursively 2024-06-27 14:42:27 +09:00
Hermet Park
3019bb81e8 example: do not redraw for the static content 2024-06-27 14:42:27 +09:00
Hermet Park
8c11fa085f example: ++exception handling 2024-06-27 14:42:27 +09:00
Mira Grudzinska
0f2fe0c4d4 common: fix rendering failure
In case of a problem with loading font data, there
is no paint inside a text that can be rendered,
but this should not interrupt the rendering process
of other paints. Now fixed.

@Issue: https://github.com/thorvg/thorvg/issues/2468
2024-06-27 14:42:27 +09:00
Mira Grudzinska
90ee76bd7b examples: fix sdl2 headers in Capi example 2024-06-27 14:42:27 +09:00
Sergii Liebodkin
a671254400 examples: fix sdl2 headers includes path
Fix SDL2 headers include path to release IDE warnings.
Tested on linux and macos
2024-06-27 14:42:27 +09:00
Hermet Park
fd6385a17b example: synchronize the canvas before the window pops up.
This ensures that the window pops up with the appropriate content,
since windows can be popped up asynchronously with mainloop.
2024-06-27 14:42:27 +09:00
Hermet Park
376acfacdb examples: --unnecessary initial buffer clear 2024-06-27 14:42:27 +09:00
Hermet Park
7ee3db0ce9 tvg: updated binaries 2024-06-27 14:42:27 +09:00
Hermet Park
2761f75a4e example/LottieExtension: adjusted its window size 2024-06-27 14:42:27 +09:00
Hermet Park
518be23db2 gl_engine: revise the gl portability
- guarantee minimum gl version requirement
- removed glesv2 dependency
- corrected gl ver dependency

issue: https://github.com/thorvg/thorvg/issues/2282
2024-06-27 14:42:27 +09:00
RuiwenTang
5836661155 gl_engine: Fix compile error if only has OpenGL library on MacOS
Since GLES headers and library can not be found on MacOS,
use macros to determin if link with OpenGL library.
2024-06-27 14:42:27 +09:00
Hermet Park
c2a205047e example: clear buffer properly.
The update might affect areas outside of the
default window. Update the sample to handle window
resizing.
2024-06-27 14:42:27 +09:00
JunsuChoi
400511c123 examples: Support window resizable
Add SDL_WINDOW_RESIZABLE to the sdl window property
and call canvas->update() in the resize event.

Afterwards, if the canvas needs to be expanded by the window size by passing the size as an argument
to the update(canvas,elapsed) interface, it can be processed individually.
2024-06-27 14:42:27 +09:00
Hermet Park
38765b7ac0 examples: replace the efl toolkit with sdl
see also: https://www.libsdl.org/

issue: https://github.com/thorvg/thorvg/issues/1244
2024-06-27 14:42:27 +09:00
Mira Grudzinska
4f32a15acb examples: add FillSpread example
@Issue: https://github.com/thorvg/thorvg/issues/2124
2024-06-24 14:56:07 +09:00
Mira Grudzinska
80b1e911ba examples: capi updated with text examples 2024-06-24 14:55:09 +09:00
Mira Grudzinska
7ec67baf9a examples: ensure the file is closed
In case of an error during memory allocation
for file data, the file was not closed.
2024-06-24 14:53:32 +09:00
Hermet Park
bfcde7403e examples: ++ function name alignment 2024-06-24 14:51:04 +09:00
Mira Grudzinska
c35b731f0f example: load font from memory in Text.cpp 2024-06-24 14:50:22 +09:00
Hermet Park
137383ff78 examples: fix memory leak 2024-06-24 14:43:14 +09:00
Mira Grudzinska
710fa22d50 capi: bindings for strokeTrim
Example Capi.cpp modyfied.
2024-06-24 14:41:15 +09:00
Mira Grudzinska
ad748df345 examples: add StrokeTrim example 2024-06-24 14:40:40 +09:00
Mira Grudzinska
816e7cc584 examples: fix heap-use-after-free in Capi.cpp 2024-06-24 14:36:12 +09:00
RuiwenTang
e6deee7fd8 Fix AnimateMasking with GL backend not triger redraw 2024-06-24 14:34:11 +09:00
Hermet Park
f30b0fe04c examples: added more svg resources. 2024-06-24 14:31:28 +09:00
Hermet Park
22cb25b488 examples: added a viewport sample 2024-06-24 14:21:55 +09:00
Hermet Park
63705d9f04 examples/lottie: updated resources 2024-06-24 12:36:30 +09:00
JunsuChoi
6249263d2a example: Sync setting size and window default size
When WIDTH and HEIGHT values change,
the default size of the window also changes.
2024-06-24 12:36:04 +09:00
Hermet Park
b3d4b36710 examples/lottie: added expressions sample 2024-06-24 12:27:35 +09:00
RuiwenTang
a6974a9495 gl_engine: fix rendering error caused by viewport and stencil state
Fix some error:
* glViewport not controlled by framebuffer, and need to set manually when
target framebuffer is changed.
* change even-odd stencil operation, so no need to do third draw call to
  clear stencil buffer
* fix the missing `GlCanvas::update` calls in Lottoe and LottieExtension
2024-06-24 12:27:17 +09:00
Mira Grudzinska
cc92865634 build: enforcing saver/loader usage for given tool
Selecting a tool without choosing the required tools
resulted in a usage error. Now, the activation
of the appropriate saver/loader for a given tool
is enforced.
2024-06-24 12:21:10 +09:00
Lucas Niu
e6e7ca9fee examples/lottie: Add example for the Marker
Co-authored-by: Jinny You <jinny@lottiefiles.com>
2024-06-24 12:02:53 +09:00
Hermet Park
f5cd67b77e tvg: updated binary resources to v0.13 2024-04-07 15:15:59 +09:00
Hermet Park
9374437115 example: fixed broken tvg saver resource pathes 2024-04-07 15:15:59 +09:00
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