Hermet Park
407fcf69e3
common: code refactoring
...
Replace the math functions with operator overloading.
This should potentially reduce the code size.
2024-06-24 14:33:49 +09:00
Hermet Park
746c466df3
test: added viewport test
2024-06-24 14:29:19 +09:00
Hermet Park
e17fdbe3c6
test: clean up test suites
...
Merge two separate units: SwCanvas and SwCanvasBase.
2024-06-24 14:28:20 +09:00
Jinny You
f000d9f766
test/lottie: added the slot resetting in animated property case
2024-06-24 14:18:59 +09:00
Hermet Park
06553966e1
test/animation - added a frame counting test-suite.
2024-06-24 14:13:52 +09:00
Mira Grudzinska
b2be63a2d3
test: fix margin value
...
The precision margin for the comparison
has been set to 0.01f instead of 004004.
2024-06-24 14:11:54 +09:00
Hermet Park
374e4ab82f
test: corrected wrong implementation.
...
identifier should have been methods.
2024-06-24 12:35:17 +09:00
Jinny You
911d14535d
bindings/capi: Fix incompatible parameter
...
C API doesn't support default parameter, removed it.
Issue: #2228
2024-06-24 12:29:59 +09:00
Mira Grudzinska
548a201b93
build: add missing ifdef
...
The thorvg_lottie.h file wasn’t accessible
if the lottie loader was not activated,
causing a compilation error.
2024-06-24 12:18:10 +09:00
Jinny You
22513b2fea
test/lottie: Add the segment use case
2024-06-24 12:05:34 +09:00
Rafał Mikrut
1c74e1e40a
Finding crashes and adding comments
2024-06-24 11:57:28 +09:00
Hermet Park
f5cd67b77e
tvg: updated binary resources to v0.13
2024-04-07 15:15:59 +09:00
Hermet Park
f578a8947f
test: improve the test-coverage.
...
make the lottie/text coverage up.
issue: https://github.com/thorvg/thorvg/issues/2067
2024-04-07 15:15:59 +09:00
Jinny You
62e7f0a7c6
test/lottie: added the slot resetting use case
2024-04-06 12:08:23 +09:00
Rafał Mikrut
71f596b173
Better regression testing
2024-04-06 12:08:22 +09:00
Jinny You
fb20938b14
test: Added test code for the lottie slot
...
This patch adds the test case for the recently introduced lottie slot API.
@Issues: https://github.com/thorvg/thorvg/issues/2029
2024-04-06 12:08:21 +09:00
Hermet Park
d07eb87ca3
renderer/canvas: Optimize logic by removing paint verification.
...
Allow direct updates to the paint object without prior validation.
The verification process is deemed inefficient;
users are expected to ensure the paint is updated using a canvas
that contains it.
This might break the backward compatibility.
2024-04-05 18:01:28 +09:00
Hermet Park
a8fc3a6e50
renderer: revise the internal logic.
...
dispose of the resources at the end of the paint deletion.
This will help retain the resources of the retained paints
and reuse them after reconstructing the next scene.
2024-04-05 17:46:32 +09:00
Jinny You
92288c8291
updated copyright date ( #1866 )
2024-01-02 20:34:12 +09:00
Hermet Park
6f19c581e8
infra: renamed the folders, images -> resources.
...
these folders might have more than images.
2024-01-02 20:34:10 +09:00
Hermet Park
f98d01c2c5
test: added gif save test
...
Skipped capi tests this time, since it has no saver api now.
2024-01-02 20:34:06 +09:00
Hermet Park
0832a188fe
animation/lottie: updated the frame count unit.
...
replace the frame count unit from the int32_t to float
since animations could smoothly interpolate key-frames.
This notificably improve the animation smoothness in Lottie
Beta API changes:
Result Animation::frame(uint32_t no) -> Result Animation::frame(float no)
uint32_t Animation::curFrame() const -> float Animation::curFrame() const
uint32_t Animation::totalFrame() const -> float Animation::totalFrame() const
2023-12-26 17:51:53 +09:00
Hermet Park
c7123a1547
test: enhanced the unit-test coverage
...
supplements animation/lottie/sw_engine test cases.
updated the page: https://github.com/thorvg/thorvg/wiki/Unit-Tests
Issue: https://github.com/thorvg/thorvg/issues/1669
2023-09-26 10:48:33 +09:00
Hermet Park
2f1873f04e
test/capi: update unit tests
...
added a Tvg_Composite_Method::TVG_COMPOSITE_METHOD_NONE case
2023-09-25 21:33:23 +09:00
Hermet Park
87dee3c1f7
loader/lottie: fix a memory leak
...
A dangling scene instance should be deleted properly.
2023-09-18 10:41:00 +09:00
Hermet Park
7d797ee548
Yet we don't break apis, this patch reverts the next:
...
cb36c25aff
8c0fc2b25a
c1e4e0808a
Those reverted changes sholud be in the bucket, the next issue item:
@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-08-24 01:00:57 +09:00
Mira Grudzinska
cb36c25aff
test: dashed stroke with offset added
2023-08-23 12:40:27 +09:00
Mira Grudzinska
8c0fc2b25a
capi: dashed stroke setter and getter modyfied
...
tvg_shape_set_stroke_dash() and tvg_shape_get_stroke_dash()
require an extra argument: offset
2023-08-23 12:40:27 +09:00
Hermet Park
3eca77b280
infra wasm: remove useless wasm test.
...
the test hasn't been maintained properly,
and we won't be maintaining it anymore.
please use thorvg.viewer intead. it's much more accurate.
2023-08-04 15:09:28 +09:00
Hermet Park
0e97d21752
common canvas: Alter the concept of the Canvas::clear() API.
...
We've changed the behavior of Canvas::clear(false).
The canvas::clear(false) now retains the paints, allowing the user to update the next frame
more easily without having to recompose the paint list.
Previously, clear(false) removed the paint list from the canvas,
requiring the user to re-push all of them in the next frame.
Now, we offer the Canvas::paints() API, allowing users to modify the paint list directly instead.
This change will break compatibility with previous versions of Canvas.
Therefore, this update is included in ThorVG 1.0.
@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-08-02 17:23:53 +09:00
Mira Grudzinska
c5a02b90df
tests: bounds test ++
...
The 'transformed' arg of the 'bounds' api
wasn't tested. Added.
2023-08-01 14:53:12 +02:00
Hermet Park
3512beab9f
test: ++blending
2023-06-20 11:30:18 +09:00
Hermet Park
90c9810b97
test: ++coverage of Canvas::paints(), Scene::paints()
2023-06-14 10:46:21 +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
Martin Capitanio
44a750ee5d
API, CAPI, sw_engine: add suport for stroke-miterlimit.
2023-06-13 10:42:20 +09:00
JunsuChoi
595cc56e86
webp_loader: Introduce Webp image loader
...
Add external_webp loader which uses libwebp library.
2023-06-09 10:58:01 +09:00
Hermet Park
b214fd23bc
common canvas/scene: introduce paints() api that returns the list of the paints.
...
These new apis would enable users to easily modify the motion scene,
The data structure of the paints has been changed from an array to a list.
@APIs:
std::list<Paint*>& Canvas::paints() noexcept;
std::list<Paint*>& Scene::paints() noexcept;
@Deprecated:
Result Canvas::reserve(uint32_t size) noexcept;
Result Scene::reserve(uint32_t size) noexcept;
@Issue: https://github.com/thorvg/thorvg/issues/1203
2023-06-09 10:54:03 +09:00
Martin Capitanio
4def2a679c
Fix clang compiler warnings in unit tests.
...
[clang] Warn on unqualified calls to std::move and std::forward
See: https://reviews.llvm.org/D119670
[141/166] Compiling C++ object test/tvgUnitTests.p/testAccessor.cpp.o
../thorvg-git/test/testAccessor.cpp:58:29: warning: unqualified call to
'std::move' [-Wunqualified-std-cast-call]
picture = accessor->set(move(picture), nullptr);
^
std::
...
2023-06-07 16:56:30 +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
72f89fcf53
test: add Inverse Luma Mask test cases
2023-05-20 20:11:58 +09:00
Mira Grudzinska
ca0f30c4c0
tests: capi test for tvg_shape_set_paint_order
2023-05-20 13:23:47 +09:00
Hermet Park
5ceeb32ef0
api: remove a beta api.
...
- Result Picture::viewbox(float* x, float* y, float* w, float* h) const; //c++
- vg_Result tvg_picture_get_viewbox(const Tvg_Paint* paint, float* x, float* y, float* w, float* h); //c
@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-05-20 13:22:52 +09:00
Hermet Park
f633717e9f
test shape: add stroke order test
2023-05-20 13:22:52 +09:00
Hermet Park
fe14e4f499
api: rename beta apis.
...
- SwCanvas::Colorspace::ABGR8888_STRAIGHT -> SwCanvas::Colorspace::ABGR8888S
- SwCanvas::Colorspace::ARGB8888_STRAIGHT -> SwCanvas::Colorspace::ARGB8888S
@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-05-20 13:22:52 +09:00
Vincent Torri
be2de28312
portability: fix usage of TVG_API
...
Rule of thumb on Windows:
* for a DLL:
* if the library is built, set TVG_API to __declspec(dllexport)
* if the library is used, set TVG_API to __declspec(dllimport)
* for a static library, set TVG_API to nothing
To set TVG_API for a static library, TVG_STATIC is defined when the stataic library is built.
Otherwise, TVG_API is correctly set for a DLL.
Also sun and intel compilers are handled
@issue: https://github.com/thorvg/thorvg/issues/1446
2023-05-16 18:55:33 +09:00
Hermet Park
9d9f38c875
common: code refactoring
...
Replace standard casting with tvg::cast()
2023-05-15 12:07:55 +09:00
Hermet Park
07cb8fd55b
test: updated tvg binaries.
2023-05-12 17:53:10 +09:00
JunsuChoi
6d16713ce9
test_capi: Add missing *_del api
2023-05-10 21:05:26 +09:00
Mira Grudzinska
78c5034229
tests: lcov++ (sw_engine)
2023-05-10 14:36:02 +09:00
Hermet Park
a992e571a3
test capi: ++CompositeMethod coverage
2023-05-09 23:19:15 +09:00