The color input will contain at least colorStops.count * 4
elements (not including alpha). Since the alpha offset values
don't have to much colorStops, estimation is used.
For long Bezier curves compared to the offset value,
the offsetting algorithm caused deformation. The problem
became evident after adding mask extension, as the simple
shapes defined there are based on Bezier curves rather
than as shapes like a circle/rect/etc, which is the case
for the offset. Now fixed.
shape render region should be aligned with the
current shape bbox. this could bring the compact size
of the rendering region even shapes are not drawable.
During the stroke's outline calculation, the function
handling small cubics set all angles to zero. When
the cubic was small but not zero, this resulted in
incorrect outlines. Now such curves are ignored.
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
Issue: https://github.com/thorvg/thorvg/issues/2776
Issue: https://github.com/thorvg/thorvg/issues/2712
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
- OpenMp threads will be allocated alongside the TaskSculeduler::threads()
- Performance improved by 2x in a specific animation.
- Disable the thread feature in the Android build test due to system issues with OpenMP compilation.
Scene effects are typically applied to modify
the final appearance of a rendered scene,
such as adding a blur effect.
Each effect would have a different number of parameters
to control its visual properties. The Scene::push() interface
uses variadic arguments to accommodate various cases.
Users should refer to the SceneEffect API documentation
and pass the parameters exactly as required for the specific
effect type. For instance, GaussianBlur expects 3 parameters
which are:
- sigma(float)[greater than 0]
- direction(int)[both: 0 / horizontal: 1 / vertical: 2]
- border(int)[extend: 0 / wrap: 1]
- quality(int)[0 ~ 100]
and, scene->push(SceneEffect::GaussianBlur, 5.0f, 0, 0, 100);
New Experimental APIs:
- SceneEffect::ClearAll
- SceneEffect::GaussianBlur
- Result Scene::push(SceneEffect effect, ...);
Example:
- examples/SceneEffect
issue: https://github.com/thorvg/thorvg/issues/374