Commit graph

159 commits

Author SHA1 Message Date
Mira Grudzinska
f79558eb62 API: deprecate the appendArc() api
@Issue: https://github.com/thorvg/thorvg/issues/2632
2024-08-16 13:30:58 +09:00
Hermet Park
407fc84796 common: spec out Scene Clipper
Scene Clipper is an unusual feature
that is too unstable and ambiguous in ThorVG.

Users can achieve the same functionality
with multiple composed shapes instead of scene clipping.

size: -2.5kb

issues:
- https://github.com/thorvg/thorvg/issues/1548
- https://github.com/thorvg/thorvg/issues/1549
- https://github.com/thorvg/thorvg/issues/1573
2024-08-13 10:21:54 +09:00
Hermet Park
92303e91b4 examples: added Interaction sample
The Interaction sample demonstrates
how to handle user input with ThorVG Animation.
2024-08-07 12:02:22 +09:00
Hermet Park
d62b913455 renderer/accessor: revise set() api for animation support
before:
unique_ptr<Picture> Accessor::set(unique_ptr<Picture> picture, function<bool(const Paint* paint)> func)

after:
Result Accessor::set(const Picture* picture, std::function<bool(const Paint* paint, void* data)> func, void* data)
2024-08-07 12:02:22 +09:00
Hermet Park
8e91711358 examples: added Lighten/Darken options in MaskingMethods 2024-08-07 11:04:38 +09:00
Hermet Park
adbf7d3a2f examples/lottie: updated a resource.
polished up for the animation smoothness.
2024-08-06 16:45:39 +09:00
Hermet Park
c257994d5c lottie/expressions: feature enhancement
added groupIndex() support
added property (ix) value support
2024-07-31 18:26:42 +09:00
Hermet Park
de72161087 example: merge Path & PathCopy 2024-07-21 15:05:07 +09:00
Hermet Park
db889e1835 renderer: quick skip rendering if the opacity is zero
This also resolves a corner case bug introduced by
lottie render pooling: f06127ab93
2024-07-21 15:05:07 +09:00
Hermet Park
803dcb3fb9 lottie/expressions: ++coverage enhancement
Allow to access layer index globally.
2024-07-19 23:01:29 +09:00
Hermet Park
65fe1cb465 examples: updated lottie samples 2024-07-19 15:19:36 +09:00
Hermet Park
9e7d8b37ff examples: added more expressions samples 2024-07-18 22:14:05 +09:00
Hermet Park
16cb1020ac lottie/expressions: added a missing polystar property build. 2024-07-18 20:46:06 +09:00
Hermet Park
350f7a4357 examples: ++exception handling
Added handling for engine initialization failure.
2024-07-14 12:04:31 +09:00
Hermet Park
b915455e89 examples: added LottieExpressions 2024-07-12 18:57:10 +09:00
Hermet Park
ad2b6f6d51 examples: updated lottie samples 2024-07-12 00:39:31 +09:00
Hermet Park
a69a5c300f examples: added svg samples 2024-07-11 23:31:07 +09:00
Hermet Park
61b68fab5b example: print non support webgpu msg properly. 2024-07-09 11:26:18 +09:00
Hermet Park
329ab9ef4a example: ++ DirectUpdate to cover more scenarios. 2024-07-08 11:39:28 +09:00
Hermet Park
300ced90c1 example: improved to print proper fail msgs. 2024-07-08 11:39:28 +09:00
Hermet Park
889d1d1fa2 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-07-05 21:25:58 +09:00
Sergii Liebodkin
4693d7f4c1
examples: fix surface refresh approuchfor webgpu
Move surface refresh approach from engine side to user size.
2024-07-04 20:54:14 +09:00
Josh Soref
e061fa6628
common: fix 178+ spelling errors 2024-07-01 21:58:46 +09:00
Hermet Park
7556253c53 example: do not scan a given resource folder recursively 2024-06-27 14:12:28 +09:00
Hermet Park
23688dfb78 example: do not redraw for the static content 2024-06-27 12:54:53 +09:00
Hermet Park
f80814847d example: ++exception handling 2024-06-27 11:33:56 +09:00
Mira Grudzinska
adbf1d3cab 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 10:34:15 +09:00
Mira Grudzinska
9cfc65fbc7 examples: fix sdl2 headers in Capi example 2024-06-27 10:33:53 +09:00
Sergii Liebodkin
f837ecf164 examples: fix sdl2 headers includes path
Fix SDL2 headers include path to release IDE warnings.
Tested on linux and macos
2024-06-26 15:38:49 +02:00
Hermet Park
4c57a64a82 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-26 01:46:10 +02:00
Hermet Park
21f82c08db examples: --unnecessary initial buffer clear 2024-06-24 21:42:39 +09:00
Hermet Park
d3b7da9f97 release: updated tvg binaries 2024-06-24 17:35:14 +09:00
Hermet Park
5172b04d77 example/LottieExtension: adjusted its window size 2024-06-24 11:19:16 +09:00
Hermet Park
af1f3cb59d 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-24 11:08:28 +09:00
RuiwenTang
b71d9d563a 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-23 19:34:31 +09:00
Hermet Park
58418afac8 example: clear buffer properly.
The update might affect areas outside of the
default window. Update the sample to handle window
resizing.
2024-06-23 14:51:43 +09:00
JunsuChoi
f80e7a2b13 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-21 17:48:19 +09:00
Hermet Park
1dcd2c4b5f examples: replace the efl toolkit with sdl
see also: https://www.libsdl.org/

issue: https://github.com/thorvg/thorvg/issues/1244
2024-06-20 17:49:18 +09:00
Mira Grudzinska
0d3d242f0c examples: add FillSpread example
@Issue: https://github.com/thorvg/thorvg/issues/2124
2024-06-18 10:51:06 +09:00
Mira Grudzinska
6829593ac6 examples: capi updated with text examples 2024-06-18 10:50:53 +09:00
Mira Grudzinska
c6bd09648c examples: ensure the file is closed
In case of an error during memory allocation
for file data, the file was not closed.
2024-06-17 11:45:25 +09:00
Hermet Park
3f38f661be examples: ++ function name alignment 2024-06-13 14:44:55 +09:00
Mira Grudzinska
50d1d2fd36 example: load font from memory in Text.cpp 2024-06-11 20:59:39 +09:00
Hermet Park
2abfa98bae examples: fix memory leak 2024-06-07 23:56:12 +09:00
Mira Grudzinska
566b327f09 capi: bindings for strokeTrim
Example Capi.cpp modyfied.
2024-06-05 11:55:36 +09:00
Mira Grudzinska
e868e6e343 examples: add StrokeTrim example 2024-06-05 11:55:36 +09:00
Mira Grudzinska
185836d278 examples: fix heap-use-after-free in Capi.cpp 2024-05-31 10:02:58 +09:00
RuiwenTang
a50335686d Fix AnimateMasking with GL backend not triger redraw 2024-05-27 23:14:08 +09:00
Hermet Park
5c8b68c220 examples: added more svg resources. 2024-05-24 10:45:24 +09:00
Hermet Park
39fb3ed478 examples: added a viewport sample 2024-05-18 18:10:50 +09:00