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
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
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.
[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
../src/loaders/svg/tvgSvgLoader.cpp: In function ‘void _copyAttr(SvgNode*, const SvgNode*)’:
../src/loaders/svg/tvgSvgLoader.cpp:2911:44: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
2911 | if (to->node.polygon.pts.count = from->node.polygon.pts.count) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/loaders/svg/tvgSvgLoader.cpp:2917:45: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
2917 | if (to->node.polyline.pts.count = from->node.polyline.pts.count) {
Renamed internal methods; the name 'RGBA' is sometimes confusing
because the channel composition does not accurately reflect it.
Therefore, it should be removed or replaced with 'Pixel'.
Considering the fundamental scenario,
the masking feature would likely be used less frequently.
We sacrifice a small amount of performance
by substituting the multiple implementations with blender calls.
However, this trade-off can result in a reduction in binary size.
Bin size: 212089 -> 205907 (-6kb)