Until now lottie loader supported only a single
dash-gap pair, and only the case where only the dash
was provided was handled correctly. When both values
were provided, the gap was incorrectly increased by
the dash value. If more values were supplied, only
the last pair was considered.
@Issue: https://github.com/thorvg/thorvg/issues/3191
This eliminates the jerryscript features
which are unlikely to be used by thorvg.
- JERRY_LINE_INFO
- JERRY_PROMISE_CALLBACK
- JERRY_FUNCTION_TO_STRING
- JERRY_MEM_GC_BEFORE_EACH_ALLOC
- JERRY_CPOINTER_32_BIT
- JERRY_REGEXP_STRICT_MODE
We have improved the functionality to manage the memory pool safely,
by figuring out the current working threads. Users no longer need to
manually configure memory pool management, and the related APIs
have been removed.
API Removals:
- Result SwCanvas::mempool(MempoolPolicy policy)
- enum SwCanvas::MempoolPolicy
- Tvg_Result tvg_swcanvas_set_mempool(Tvg_Canvas* canvas, Tvg_Mempool_Policy policy)
- enum Tvg_Mempool_Policy
issue: https://github.com/thorvg/thorvg/issues/3116
Bug introduced as part of a7e7bbc.
After recalculating begin and end to the 0-1 range, an extra
check was added to handle cases when begin is very close to end.
However, this was a bad approach since, even for very close values,
their relationship remains important. What should have been
done in the mentioned commit is properly handling the case
begin == end, which was incorrectly treated as trimming from begin
to end. Instead, it should be handled as trimming from begin to
1.0 and from 0.0 to end.
@Issue: https://github.com/thorvg/thorvg/issues/3204
- In cases where the begin and end values of trimming did not
result in trimming (end - begin > 1), trimming was ignored.
However, when the stroke is also dashed, this case affects
the shift of the point where the first dash becomes visible.
- Trimming that passes through the curve's start point (like -0.1:0.1)
requires passing through the curve twice. The points obtained from
both passes must be joined - visible when dashing
Cases for simultaneous = true have been handled.
@Issue: https://github.com/thorvg/thorvg/issues/3192
The idea of introducing epsilon during trimming was to
eliminate the occurrence of short segments whose length
would be zero when higher computational accuracy was used.
By mistake, during the refactor of 8ed4c2f302,
one of the conditions was lost. Fixed.
@Issue: https://github.com/thorvg/thorvg/issues/3053
The trim handling from sw_engine has been removed.
Instead the common logic from the TrimPath structure
is used.
On the sw_engine side, the dashed outline is now
used for both: dashed and/or trimmed strokes.
@Issue: https://github.com/thorvg/thorvg/issues/2854
frame tweening allows user to interpolate two frames
over a speicified duration. This Tweening functionality
can be particularly powerful when combined with state-based
(a.k.a. Marker) animation playback in Lottie.
For example, apps support state machine based animations,
where the transition sequences between states are not linear
and can occur in highly irregular directions.
Experimental APIs:
- Result LottieAnimation::tween(float from, float to, float progress)
- Tvg_Result tvg_lottie_animation_tween(Tvg_Animation* animation, float from, float to, float progress)
Dodge d / (1 - s):
- handle d = 0 first to avoid 0/0 when s = 1
- for d != 0 and s = 1, the formula results in d/0 (infinity),
which maps to 1 in the 0-1 range (or 255 in the 0-255 range)
Burn 1 - (1 - d) / s:
- handle d = 1 first to avoid 0/0 when s = 0
- for d != 1 and s = 0, the formula results in 1 - 0/0 -> 1 - inf = -inf
Negative infinity in the 0-1 range corresponds to the minimum possible
value, which is 0 (255 if we operate in 0-255 range).
Replaced ceil and direct casts with nearbyint to improve
viewport size calculation. This ensures consistent
approach with the fastTrack case in sw_engine.
@Issue: https://github.com/thorvg/thorvg/issues/3148
Unify the common parts of the parsing logic
by applying a strategy pattern,
allowing the behavior to vary based on the effect type.
This helps to reduce the size and improved the parsing safety.