According to the SVG standard, drawing a rectangle
starts at (x+rx, y) point. Till now it was (x+w, y+ry).
The difference was visible only for dashed strokes.
According to the SVG standard, drawing a circle/ellipse
should start at the '3 o'clock' position and proceed
in a clock-wise direction. Until now, this point was
set at '12 o'clock'.
The differences in the outcome were visible for dashed
strokes.
issue: https://github.com/thorvg/thorvg/issues/1686
The lottie format defines the starting point for
drawing rectangles and ellipses differently than
the API available in the TVG. In the case of using
dashes or trim paths, this leads to discrepancies.
Therefore, when using the lottie builder, internal
functions for appending rectangles and circles are
utilized.
@issue: https://github.com/thorvg/thorvg/issues/1997
these experimental apis are allowed to use
when the lottie loader is enabled.
APIs:
- Tvg_Animation* tvg_lottie_animation_new()
- Tvg_Result tvg_lottie_animation_override(Tvg_Animation* animation, const char* slot)
This class extends the Animation and serves advanced Lottie features.
It's designed to separately have Lottie Animation's unique specs.
For now, this will have Slot overriding feature,
you can include <thorvg_lottie.h> for its extensive features.
@APIs:
- Result LottieAnimation::override(const char* slotJson) noexcept;
- static std::unique_ptr<LottieAnimation> LottieAnimation::gen() noexcept;
@Issue: https://github.com/thorvg/thorvg/issues/1808
Internal model and parser modifications have been made
to parse "sid" and retrieve their data into the LottieComposition.
This will enable dynamic changes to the following Lottie objects:
The slot feature will encompass these properties:
- LottieSolidStroke
- LottieSolidFill
- LottieGradientStroke
- LottieGradientFill
- LottieTextDoc"
Issue: https://github.com/thorvg/thorvg/issues/1808
Co-authored-by: Hermet Park <hermet@lottiefiles.com>
To ensure consistent properties, `LottieSolid` has been defined.
Both `LottieSolidStroke` and `LottieSolidFill` can be typecasted to the `LottieSolid`.
Improve parenthesis checking and space checking.
- There must be only one pair of parentheses.
- There cannot be spaces(and ') between id strings.
Issue: https://github.com/thorvg/thorvg/issues/1983
Co-authored-by: Hermet Park <hermet@lottiefiles.com>
Dashed curves require greater precision in calculating
their lengths and while splitting Bezier curves.
Otherwise, it results in visual discrepancies compared
to the expected outcomes.
Approximate functions 'bezLengthApprox' and 'bezAtApprox'
used for calculations in the lottie loader.
issue: https://github.com/thorvg/thorvg/issues/1686
In the case of non-uniform scaling for
thick strokes, artifacts were visible.
The calculations took into account the angle
resulting from the already transformed points,
whereas the untransformed points should have
been considered - the transformation is taken
into account in the next step.
@issue: https://github.com/thorvg/thorvg/issues/1915
enhance decoding efficiency by determining the desired canvas format
during image loading. This allows loaders to preemptively decode
the image in the specified format, to not convert the format again.
Attempt to load a given file/data using candidate formats
when the desired loader fails. This approach will enhance
the compatibility with various file formats in unexpected scenarios.
Previously, we had removed this feature, but have since
recognized its necessity due to the impact on file data
in specific corner cases.
* add new render task to do stencil and cover rendering which is a
fallback rendering method to handle cases that trianglation tessellation
failed
* add a new tessellator to generate stencil and cover vertex mesh
Version 0.58 find missing libraries and causes an error.
(ex: libwebp 1.0).
There is no need to fix the current version, so always use the latest version.
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.
Adjusted the sampling position basis by -0.5 pixel
to enhance edge line interpolation quality.
This change addresses an issue with the image up-scaling process,
resulting in clearer and more accurate visuals.
issue: https://github.com/thorvg/thorvg/issues/1949
Previously, the logic was set to halt rendering when any part of the paints,
particularly bitmap-based images, failed to render.
This update modifies the behavior to continue drawing the scene,
allowing for the successful rendering of other elements.
issue: https://github.com/thorvg/thorvg/issues/1951
* merge vertices that are close enough before tessellation
* append return branch in tessellation to prevent dead loop caused by floating point precision