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
Corrected the alpha interpolation order during blending.
This also corrected the hard mix blending result in the guitar sample.
issue: https://github.com/thorvg/thorvg/issues/2704
move instance, adapter and device creation from renderer to application
its necessary for web integration, because browser have its own mechanics to create hardware handles
this changes makes webgpu canvas more universal to use in case of system and web applications
issue: https://github.com/thorvg/thorvg/issues/2410
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
A numerically motivated limit on the matrix determinant
set at 1e-6 was not sufficient. The limit has been increased
by checkoing whether 1/det is still a number.
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 limit on leftovers was too small, which became
noticeable for animations with trimming - currently
implemented with the dashing alg.
The limit has been increased.
The anti-aliased outline color was incorrectly blended
at the multiply option.
The fix can be observed in the example:
'examples/lottie/resourcesguitar.json'
in order to do this, RenderMehthod::blend() method introduced
`bool direct` for figuring out the intermediate composition.
An uint8_t version of the lerp function
is introduced to handle cases where
the interpolation factor t exceeds 1, which
previously caused overflow issues due to casting.
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
- used hardware blending stage for scene blending
- used AABB for scene blending
- reduced number of offfscreen buffers coping
- reduced number of render pass switching
- used render pipelines abilities to convert offscreen pixel format to screen pixel format
- removed unused shaders
- 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.
The y range initialization was missing a check to ensure
that the height is a positive value. This could lead to
an attempt to call malloc with a negative argument, which
cast to an unsigned value, caused a crash.
Introduced the abstract EngineMethod to handle
different engines more effectively using polymorphism.
Co-authored-by: Jinny You <jinny@lottiefiles.com>
Updated WASM binding to bring WebGPU on the web player.
binding will generate a WASM binary, which can render animation through both SW and WG raster engine.
A raster engine will be chosen by parameter `engine`, when initializing.