Previously, local fonts had their own rendering process, which did not support advanced features such as Range Selector, Alignment Options and Follow Path.
To enable these features and unify the logic, local fonts are now rendered glyph by glyph.
- modify the concept of AABB to apply only to transformed shapes.
- transform points before computing the bounding box min/max
to obtain a more compact shape region.
- trimmming memory by removing the cached matrix, about 36kb
of memory has been reduced per paint instance.
The Emscripten header was previously used because the WebGPU initialization logic was in WgContext::initialize.
Now, initialization occurs at the binding/application level.
added 2 more APIs for user convenience to allow backtracking tree traversal.
API Additions:
- const Paint* Paint::scene() const
- const Tvg_Paint* tvg_paint_get_scene(const Tvg_Paint* paint)
When the datas are copied with deep copy, memory issue caused (SEGV on unknown address) due to these reasons:
1. `mimeType` is nullptr when it's not embedded(base64) data
2. datas(b64Data, mimeType) should not be clear, it's used for next slot copy in same pair.
If the svg contained an unsupported element with <stop> elements,
they were incorrectly assigned to the last loaded gradient. Now fixed.
@Issue: https://github.com/thorvg/thorvg/issues/3321
In member function ‘constexpr LottieGenericProperty<LottieScalarFrame<float>, float>& LottieGenericProperty<LottieScalarFrame<float>, float>::ope> inlined from ‘LottieFloat& LottieStroke::dashValue()’ at ../src/loaders/lottie/tvgLottieModel.h:60:104,
inlined from ‘void LottieParser::parseStrokeDash(LottieStroke*)’ at ../src/loaders/lottie/tvgLottieParser.cpp:623:82:
../src/loaders/lottie/tvgLottieProperty.h:297:8: warning: ‘<anonymous>.LottieGenericProperty<LottieScalarFrame<float>, float>::value’ may be used> 297 | struct LottieGenericProperty : LottieProperty
| ^~~~~~~~~~~~~~~~~~~~~
../src/loaders/lottie/tvgLottieModel.h: In member function ‘void LottieParser::parseStrokeDash(LottieStroke*)’:
../src/loaders/lottie/tvgLottieModel.h:60:104: note: ‘<anonymous>’ declared here
60 | for (uint8_t i = 0; i < dashattr->size; ++i) newValues[i] = LottieFloat(dashattr->values[i]);
|
../src/renderer/wg_engine/tvgWgRenderer.cpp:623:78: runtime error: downcast of address 0x5040005b7010 which does not point to an object of type 'RenderEffectFill'
0x5040005b7010: note: object is of type 'tvg::RenderEffectTint'
00 00 00 00 80 07 5d 35 c9 7f 00 00 20 60 23 00 30 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'tvg::RenderEffectTint'
../src/renderer/wg_engine/tvgWgRenderer.cpp:624:85: runtime error: downcast of address 0x5040005b7050 which does not point to an object of type 'RenderEffectFill'
0x5040005b7050: note: object is of type 'tvg::RenderEffectTritone'
00 00 00 00 a0 07 5d 35 c9 7f 00 00 40 5e 23 00 30 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
- Issue was present when masking and clipping were applied
simultaneously. In the case where the mask was in fastTrack
mode and the clip was also clipped, the fastTrack was not
reset, resulting in an incorrect rendering effect.
- For rectangular clippers with a stroke width > 0, stroke clipping
should be applied. However, the fastTrack mode was set instead,
resulting in regular clipping instead of stroke clipping.
previously, the bounding box calculation was simply
determined by comparing all the points, which led to
incorrect sizing due to Bezier control points.
Now, it accurately computes the curve boundary,
properly addressing this issue.