Mira Grudzinska
ff3767da2b
tests: ++coverage
2024-06-27 14:42:27 +09:00
Mira Grudzinska
e8702de059
tvg_saver: fix 'order' serialization
...
Serialization of the "order" attribute caused
the bytes counter to be overwritten, resulting
in the created TVG file being corrupted.
Correctly created tag.tvg file has been included
as a test resource..
2024-06-27 14:42:27 +09:00
Hermet Park
7ee3db0ce9
tvg: updated binaries
2024-06-27 14:42:27 +09:00
Hermet Park
bb9749094c
test: corrected wrong test-suite.
...
The value should be out of the range to make "NonSupport"
2024-06-27 14:42:27 +09:00
Mira Grudzinska
a61286afaa
tests: resolve different type comparison warning
2024-06-27 14:42:27 +09:00
Mira Grudzinska
410f58fa26
tests: add missing capi saver tests & ifdefs
2024-06-27 14:42:23 +09:00
Mira Grudzinska
03242b5367
common: add missing ifdef
...
In the absence of support for the TTF loader
crashes occurred. Fixed.
2024-06-24 14:56:36 +09:00
Mira Grudzinska
fd28cb9304
test: capi tests updated by text apis
2024-06-24 14:55:15 +09:00
Mira Grudzinska
5dfe2d92cf
tests: add tests for text loading from memory
2024-06-24 14:54:42 +09:00
Hermet Park
dbb0fc9476
test: resolve compiler warnings on msvc.
...
warning C4305: 'argument': truncation from 'double' to 'float'
2024-06-24 14:43:25 +09:00
Hermet Park
d5f41c85d3
api: corrected return type.
...
NonSupport indicates unsupported options due to disabled features
or lack of system support. InvalidArgument indicates the case
such as incorrect parameter values.
2024-06-24 14:42:46 +09:00
Mira Grudzinska
20a0d1379e
test: add strokeTrim tests
2024-06-24 14:41:22 +09:00
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