Commit graph

29 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
Jinny You
2c6c8d3b21
updated copyright date (#1866) 2023-12-28 10:43:25 +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
3311c8d82b examples: do not create contents that is over-counted. 2023-07-27 00:31:27 +09:00
Hermet Park
4627daf6f7 api: enhance API usability
Set the default values of rx = 0 and ry = 0 for the shape.
Only the round rectangle shape requires the usage of these values.
2023-06-13 10:42:57 +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
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
3626ded041 examples svg: adjust window size.
Still some display size is not enough large.
2023-05-19 10:35:24 +09:00
Hermet Park
41c41b538d examples: updated SVG samples.
increase the canvas to afford more resources.
2023-05-16 11:46:28 +09:00
Hermet Park
9b3c34c3b1 updated copyright. 2023-01-14 13:48:11 +09:00
Mira Grudzinska
4bdb58a8ca examples: fixing building errors on macOS
Reference to the 'count' was ambiguous (var name / std::count).
2022-12-14 10:41:42 +09:00
Hermet Park
e2057d10f1 examples: updated svg.
revised the logic to align svg images in the center of the grids.

this is the subsequent changes to 3939b61770.
2022-09-02 12:10:36 +09:00
Mira Grudzinska
74a99867df examples: terminate the same engine as was initialized 2022-01-21 23:55:17 +01:00
Hermet Park
f0141e63de updated copyright date. 2022-01-12 14:08:48 +09:00
JunsuChoi
0e57f869bc example: Modify the number of svg image examples
Find the hidden example...
2021-10-25 16:18:15 +09:00
Hermet Park
e3266ac19c examples: extends svg samples 2021-09-13 20:49:46 +09:00
Hermet Park
3ae9e33c65 examples: replace sprintf() with snprintf()
snprintf() is more preferred to use in preventing buffer overflow.
2021-07-22 16:32:12 +09:00
Hermet Park
2401495c47 examples: updated svg samples 2021-06-10 11:59:45 +09:00
Hermet Park
19fc4f4b37 examples: allow a desianted main thread capacity.
Maximum threads is not always peak the highest performance,
tvg examples guide user the proper threads count.
2021-03-24 14:19:01 +09:00
Hermet Park
1a7d41ce71 updated copyright 2021-03-23 14:31:58 +09:00
Hermet Park
0faea8a9ab examples: clean up mask resources.
These are not proper for our svg examples.
2021-03-15 19:19:54 +09:00
Patryk Kaczmarek
03d48159e3 examples: new AnimateMask example and svg images with masks
Change-Id: I609597a5ecb710e9af9939a3028eeef691b66188
2021-02-25 12:24:19 +09:00
JunsuChoi
6889f0ad1f
common Picture : Introduce Picture's size setter, getter APIs
* common Picture : Introduce Picture's size setter, getter APIs

If picture or file loaded by picture has an explicit Size(width, height),
it is transformed to fit the size.
2020-12-04 15:03:25 +09:00
Hermet Park
b125a7ea2e examples: ignore loading raw image file.
in the last commit, it added a raw image file in the images folder.
It breaks Multicanvas, Svg which try to load all kinds of files in it.

We don't need to load all files by figuring out file extension name.
2020-11-23 18:56:23 +09:00
Hermet Park
e445b7f579 Revert "examples: revise example code."
This broke gl_engine rendering, revert it.

This reverts commit 9bb1972ef9.
2020-11-06 15:37:17 +09:00
Hermet Park
9bb1972ef9 examples: revise example code.
Move the Clear call to the end of drawing those scenarios doesn't need to retain paints resources.

We should show the examples as the best usage.

@Issues: 75
2020-11-04 19:05:11 +09:00
Hermet Park
433746f2bd examples: removed test prefix 2020-10-07 14:04:08 +09:00
Renamed from src/examples/testSvg.cpp (Browse further)