Commit graph

1975 commits

Author SHA1 Message Date
Hermet Park
6cb2a37326 docs: updated sample images. 2023-07-27 17:10:50 +09:00
Hermet Park
c98af8a4a2 doc: updated resources 2023-07-27 16:51:44 +09:00
Hermet Park
3368e47ab3
Update README.md 2023-07-27 16:29:39 +09:00
Hermet Park
b84bb827a5
Update README.md 2023-07-27 16:22:39 +09:00
Hermet Park
f834a7b8ab
Delete example_lottie.mp4 2023-07-27 16:14:09 +09:00
Hermet Park
473361f6a5
Add files via upload 2023-07-27 16:13:39 +09:00
Hermet Park
c180482441
Update README.md 2023-07-27 15:45:40 +09:00
Hermet Park
dcd32dd36d
Add files via upload 2023-07-27 15:34:17 +09:00
Mira Grudzinska
b0e41b2b9f svg_loader: support the '!important' directive
The directive is used to give a specific style property
higher priority, ensuring that it overrides other style
declarations for the same property.

@Issue: https://github.com/thorvg/thorvg/issues/1255
2023-07-27 11:51:45 +09:00
Hermet Park
f4717fb4c3 sw_engine: --redundant comment. 2023-07-27 00:56:22 +09:00
Hermet Park
f93fbc9e59 sw_engine: enforce the drawing of small stroke cubic outlines.
At the construction stage, some stroke points can be skipped
if the distance between the points is too narrow.

Previously, this was assumed to be an error case,
but it's clearly intended to remove unnecessary points introduced in a small area of drawing.

This sometimes leads to a flickering issue when super small-sized vector images are drawn.

Now, it's fixed.
2023-07-27 00:40:37 +09:00
Hermet Park
739bb63f92 examples animation: adds a basic example. 2023-07-27 00:31:27 +09:00
Hermet Park
3311c8d82b examples: do not create contents that is over-counted. 2023-07-27 00:31:27 +09:00
Hermet Park
ca7a9068bd examples lottie: adds a basic example 2023-07-27 00:31:27 +09:00
Hermet Park
193a9833a8 lottie loader: implement the necessary interaces. 2023-07-27 00:31:27 +09:00
Hermet Park
73a8792eae loader lottie: add lottie builder. 2023-07-27 00:31:27 +09:00
Hermet Park
03f878bb2e loader lottie: adds the lottie property, model and parser. 2023-07-27 00:31:27 +09:00
Hermet Park
b060959e0d loader lottie: add a lottie specific interpolator. 2023-07-27 00:31:27 +09:00
Hermet Park
93734fe673 infra: allow access to pImpl from the tvg internals.
Since pImpl is an ambiguous pointer, visibility is not practically effective.
On the other hand, this allows the tvg engine to easily pass data among instances.
2023-07-27 00:31:27 +09:00
Hermet Park
e7a94f5314 common Animation: introduce the Animation class.
This class serves as the base for Animation.
The main purpose of its APIs is to control the animation frames.

Its example will be provided in the upcoming commits.

@APIs:
Result Animation::frame(uint32_t no) noexcept;
Picture* Animation::picture() const noexcept;
uint32_t Animation::curFrame() const noexcept;
uint32_t Animation::totalFrame() const noexcept;
float Animation::duration() const noexcept;
static std::unique_ptr<Animation> Animation::gen() noexcept;

@Issue: https://github.com/thorvg/thorvg/pull/1450
2023-07-27 00:31:27 +09:00
Hermet Park
7e7a561d9f common loader: enable lottie loader
json/lottie extensions are recognized as Lottie file format.
2023-07-27 00:31:27 +09:00
Hermet Park
60f81b7da7 loader lottie: added empty interface body
This marks the first step towards implementing the Lottie feature.
2023-07-27 00:31:27 +09:00
Hermet Park
7c58d7afaa common frame_module: adds FrameModule interface.
This interface is designed for controlling animation frames.
2023-07-27 00:31:27 +09:00
Hermet Park
0f40eb90ae common loader: adds animatable() interface
This interface returns a value indicating
whether the current loader supports animation or not.
2023-07-27 00:31:27 +09:00
Hermet Park
250e2d7d34 loader lottie: +rapidjson for lottie json parser.
We've investigated two json parsers, simdjson & rapidjson.
Since the size is higer priorty for thorvg, we adopted rapidjson.

It's under MIT license.

See: https://github.com/Tencent/rapidjson
2023-07-27 00:31:27 +09:00
Hermet Park
de6df1fb21 loader svg: --compiler warning
warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
2023-07-26 00:46:30 +09:00
Mira Grudzinska
de41853bcf svg_loader: custom strndup moved into utils
The custom _strndup was used only in one file
as an internal function and wasn't accessible
in other parts of the code. Now function
is available as svgUtilStrndup.
2023-07-26 00:21:56 +09:00
Hermet Park
a1f0b06f41 common array: revise code.
maintain code with an optimial size.
2023-07-25 19:57:12 +09:00
Hermet Park
055daed3f3 common shape: add an internal method to forcibly update the properties.
This internal access assists in performing direct property updates
among the engine's internal objects.
2023-07-25 19:57:12 +09:00
Hermet Park
192d29fa8a common array: enhance the features.
Add a push() method that appends a whole array instance.
2023-07-25 19:57:12 +09:00
Hermet Park
d53d8d726f common bezier: enhancement to the common Bezier function
Add a method that returns the angle at position 't'.
also revise bezAt() method to allow optimal usages.
2023-07-25 19:57:12 +09:00
Mira Grudzinska
20cf8c6725 sw_engine: fix compiler warning
Warning: comparison of integer expressions of different signedness

@Issue: https://github.com/thorvg/thorvg/issues/1526
2023-07-24 01:44:24 +02:00
Hermet Park
ea4f28e5db
Update README.md 2023-07-23 14:32:24 +09:00
Hermet Park
56deda19fd
Update README.md 2023-07-23 14:27:48 +09:00
Hermet Park
0e86cfebba sw_engine raster: ++strict types. 2023-07-19 21:57:04 +09:00
Hermet Park
251c97b2d8
Update README.md 2023-07-19 20:30:56 +09:00
Hermet Park
5f8c79f593
Update README.md 2023-07-19 20:29:45 +09:00
Hermet Park
d99d8a565f common array: fix a wrong size. 2023-07-18 15:09:21 +09:00
Hermet Park
463fc853be examples webp: --compiler warning.
1 warning generated.
[122/183] Compiling C++ object src/examples/PictureWebp.p/PictureWebp.cpp.o
../thorvg-git/src/examples/PictureWebp.cpp:38:18: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    canvas->push(move(bg));
                 ^
                 std::
../thorvg-git/src/examples/PictureWebp.cpp:53:26: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        if (canvas->push(move(picture)) != tvg::Result::Success) return;
                         ^
                         std::
../thorvg-git/src/examples/PictureWebp.cpp:77:18: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    canvas->push(move(picture));
                 ^
                 std::
2023-07-18 11:02:26 +09:00
Hermet Park
952bc01c41 sw_engine: fix clang compiler warnings.
[29/73] Compiling C++ object src/libthorvg.a.p/lib_sw_engine_tvgSwStroke.cpp.obj
../src/lib/sw_engine/tvgSwStroke.cpp(258): warning C4244: 'argument': conversion from 'float' to 'int64_t', possible loss of data
[32/73] Compiling C++ object src/libthorvg.a.p/lib_sw_engine_tvgSwRaster.cpp.obj
../src/lib/sw_engine/tvgSwRaster.cpp(259): warning C4244: 'initializing': conversion from 'float' to 'uint32_t', possible loss of data
../src/lib/sw_engine/tvgSwRaster.cpp(260): warning C4244: 'initializing': conversion from 'float' to 'uint32_t', possible loss of data
2023-07-18 10:45:52 +09:00
Hermet Park
cf09ba5abd common sw_engine: code refactoring
Even though this enlarges the binary size by 300bytes,
use the array instead of individual implementations for better maintenance.
2023-07-17 20:14:58 +09:00
Hermet Park
5528eb9831 common array: code chores.
remove duplicated logic
this also changes the default grow size: N*2 -> N+(N/2)
2023-07-17 20:14:58 +09:00
Vincenzo Pupillo
c3af682f68 Refactoring of GlGeometry::decomposeOutline due to an internal change in RenderShape data structure. 2023-07-15 11:13:56 +09:00
Hermet Park
d7058e41e4 common bezier: fix a regression bug.
revert issued code from def6393d82.
2023-07-12 20:50:58 +09:00
Hermet Park
def6393d82 common bezier: Add a function that returns the position.
A utility for common use of the Bezier curve.
2023-07-11 18:35:33 +09:00
Hermet Park
81afba5035 infra: updated git setting.
@Issue: https://github.com/thorvg/thorvg/issues/1519
2023-07-10 12:36:46 +09:00
Hermet Park
3db78984da
Update README.md 2023-07-05 23:12:32 +09:00
Hermet Park
e3b1cd86f9
Update README.md 2023-07-05 23:09:13 +09:00
Hermet Park
46aa29781a common math: enhance matrix functions.
Accumulating matrix value factors would have broader usage.
2023-07-05 15:17:04 +09:00
Hermet Park
b81b23af62 common array: allow it to modify values. 2023-07-05 15:17:04 +09:00