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
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.
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.
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) {