When populating the gradient, the color/alpha should
be assigned the first possible value from the provided
ones, rather than the default value of 255.
Use a clipper instead of masking when the condition is satisfied.
Generally, clipping is cheaper than masking in fps & memory usage.
issue: https://github.com/thorvg/thorvg/issues/2647
../src/loaders/jpg/tvgJpgd.cpp:867:36: warning: ‘*&P.DCT_Upsample::Matrix44::v[0][0]’ may be used uninitialized [-Wmaybe-uninitialized]
https://github.com/thorvg/thorvg/issues/2639
Improving text render compatibility by fixing wrong Text Range.
When lottie doesn't have `end` prop in the range, system must ignore condition regarding to `end`.
The original logic unintentionally swaps `start` and `end` prop, because `end` is the zero in this case. Then the text range animation behaves the opposite.
Separate clip function from the Composite()
clipping and composition can be used together.
This helps avoid the introduction of nested scenes
when composition and clipping overlap.
Deprecated:
- enum class CompositeMethod::ClipPath
- enum Tvg_Composite_Method::TVG_COMPOSITE_METHOD_CLIP_PATH
Experimental API:
- Result Paint::clip(std::unique_ptr<Paint> clipper)
- Tvg_Result tvg_paint_set_clip(Tvg_Paint* paint, Tvg_Paint* clipper)
Issue: https://github.com/thorvg/thorvg/issues/1496
on each parse, if the `randomize` is enabled,
the start and end of the Text Range are redefined
with the same gap as the original range.
issue: https://github.com/thorvg/thorvg/issues/2178
Text can be added in parts due to the presence
of the <tspan> tag. This requires that each
subsequent piece of text is appended rather than
overwriting the previous one.
Added support for Text Based of Text Range Selector, by processing further properties:
2. Character Excluding Spaces
3. Words
4. Lines
see: https://github.com/thorvg/thorvg/issues/2178
Since the text node wasn't pushed onto the loader's stack,
closing the text node incorrectly caused an element to be
popped from the stack (if one was present).
This could result in elements that were supposed to have
that element as a parent being rendered incorrectly or not
being rendered at all.
Now, the text node is correctly pushed onto the stack.
@Issue: https://github.com/thorvg/thorvg/issues/2706
If for any reason an invalid glyph is found in text,
it will now be skipped when rendering
(instead of increasing offset by last valid glyph advance).
Issue: #2687
According to the definition of trim path elements,
the begin and end values are specified as percentages
in the range of 0-100% (this is also confirmed by AE,
where it's not possible to exceed this range).
Added clamping to align with spec.
The range of saturation and brightness values is 0 ~ 100% and range of hue is 0 ~ 360.
If a value greater than 100% is loaded, it will be modified to be 100%.
issue: https://github.com/thorvg/thorvg/issues/2678
To avoid editing the trim path values provided
by the user, the logic for their interpretation
was moved from the API to the renderer (7c87d8e).
This caused an issue in the lottie animations when
the trim path is applied more than once. Now fixed.
@issue: https://github.com/thorvg/thorvg/issues/2670
previously font size & italic style had been ignored
even if its attributes are changed.
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
issue: https://github.com/thorvg/thorvg/issues/2676
- Prevent expression processing if a property fails to parse.
- Fixed an incorrect usage of JerryScript.
This is a hotfix to address expression-related crashes.
Due to the lack of an analytical solution for Bezier
curves offsetting, a simple and computationally cheap
approximation has been implemented. The algorithm shifts
the segments connecting control points and determines
new points based on their intersections.
@issue: https://github.com/thorvg/thorvg/issues/2230
The occurrence of a 'carriage return' (13) or 'end of text' (3)
caused the skipping of the next character check, immediately
searching for it in the list of available characters.
If the next character was also 13 or 3, it led to incorrect
interpretation; however, if it was the last character in the
sequence, a crash occurred.
Spec out this incomplete experimental feature,
this is a still promising one, we will reintroduce
this officially after 1.0 release
size: -2kb
issue: https://github.com/thorvg/thorvg/issues/1372
If a Meson option is typed as `boolean`, the `get_option` returns a
boolean, and comparing it with `true` is redundant. Meson also errors if
you try to compare across types, so it couldn't _not_ be a boolean.
Also, Meson is not C, so no need for parentheses around `if` conditions.
In certain cases, the user might want to set mapped memory directly.
This update ensures that a null terminator is appended to the string data.
Co-Authored-By: Mira Grudzinska <mira@lottiefiles.com>
Issue: https://github.com/thorvg/thorvg/issues/2642
For rounded rectangles the roundness value should
be determined using to the formula:
r = min(r, max(size.x, size.y)/2)
rather than the previous method:
r = min(size.x/2, size.y/2, r)