Commit graph

41 commits

Author SHA1 Message Date
Hermet Park
65c808fc02 common: spec out TexMap
Spec out this incomplete experimental feature,
this is a still promising one, we will reintroduce
this officially after 1.0 release

size: -2kb

issue: https://github.com/thorvg/thorvg/issues/1372
2024-08-23 10:45:14 +09:00
Hermet Park
8927294374 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-15 23:18:39 +09:00
Hermet Park
7afe90ce8e 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-09 11:33:38 +09:00
Hermet Park
3fb017c2fb examples/text: hotfix
corrected wrong arguments.
2024-08-08 12:37:10 +09:00
Hermet Park
d6cdae6237 example: corrected a wrong clear call. 2024-07-12 00:58:44 +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