Commit graph

17 commits

Author SHA1 Message Date
Hermet Park
e8e9ba5ea0 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-01 10:52:22 +09:00
Hermet Park
c79e8e6271 examples: refactored the examples directory
reorganized the resources folder,
distributing contents into categorized subfolders:
SVG, Lottie, Image, Font, and TVG.
2024-03-18 18:09:03 +09:00
Hermet Park
754a4aeaea 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-03-13 10:13:02 +02:00
Hermet Park
a6f4b5f38c examples: ++safety.
Guarantee the resource free at the termination.
2023-12-31 11:41:02 +09:00
Jinny You
2c6c8d3b21
updated copyright date (#1866) 2023-12-28 10:43:25 +09:00
Hermet Park
66305f3e6d sw_engine: Clear buffer at the proper time.
Clear the buffer when canvas->clear() is called.

TODO: We need to add a color value parameter to clear it.
2023-11-15 21:12:24 +09:00
Hermet Park
d6fffd13c2 api: revise the engine initializer for the 1.0 release.
This change introduces the CanvasEngine::All type to automatically
initialize the engines available on the current system.

These revisions improve the usability of these APIs.

Addtions:
- enum class CanvasEngine::All

Modifications:
- Result Initializer::init(CanvasEngine engine, uint32_t threads) ->
Result Initializer::init(uint32_t threads, CanvasEngine engine = tvg::CanvasEngine::All)
2023-10-30 11:48:02 +09:00
Hermet Park
1ae92daa9d api: enhance Shape::fill() method usage.
Designate a default value for alpha which is mostly optional.
2023-06-07 12:10:31 +09:00
Hermet Park
f4c9c4189e examples: changed the screen size. 2023-05-29 09:45:21 +09:00
Hermet Park
f2fdc380b4 fix compiler warnings on MacOS
warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
2023-05-19 10:56:59 +09:00
Hermet Park
d8687314a6 common picture: fix a composition bug.
Previously, a picture with a half-translucent mask would not function correctly.
This fix addresses the bug by applying the expected composition step.

Note: Even after applying this patch, a half-translucent mask with shape fill alpha will still not work properly.
We should consider removing the fill alpha property, as it duplicates the Paint opacity.

@Issue: https://github.com/thorvg/thorvg/issues/1423
2023-05-17 11:11:55 +09:00
Hermet Park
737b89471a examples: ++performance test
Add masking to figure out the perf result.
2023-05-08 10:55:03 +09:00
Hermet Park
9b3c34c3b1 updated copyright. 2023-01-14 13:48:11 +09:00
Hermet Park
5fa8aac2aa examples: fix a compilation error on windows.
../src/examples/Performance.cpp:32:8: error: 'uint' does not name a type; did you mean 'u_int'?
   32 | static uint cnt = 0;
      |        ^~~~
      |        u_int

@Issues: https://github.com/Samsung/thorvg/issues/1247
2022-08-23 22:44:24 +09:00
Hermet Park
f0141e63de updated copyright date. 2022-01-12 14:08:48 +09:00
Hermet Park
749a0fbb54 example performance: improve to print average... 2021-07-27 23:32:49 +09:00
Hermet Park
db85313328 example: add a sample for checking rendering performance. 2021-07-27 13:30:06 +09:00