The viewport function defines the rectangular area of the canvas
that will be used for drawing operations.
It is used to clip the rendering output to the boundaries of the rectangle.
Apps can use this function to set the drawing region within the canvas.
When the ThorVG canvas is partially inside the screen area such as during scrolling
it could help enhance rendering performance.
New Experimental API:
- Result Canvas::viewport(int32_t x, int32_t y, int32_t w, int32_t h) noexcept;
Issue: https://github.com/thorvg/thorvg/issues/2274
- Separate the rounded corner logic from the updateStar
since its logic has become too lengthy and complicated.
- Revise the path generation to eliminate duplicates.
Added support for skew transformation by
a specified angle around a specified axis.
Applied to layers and shapes, not to repeaters.
@Issue: https://github.com/thorvg/thorvg/issues/2262
Implementation of the roundness property
for a polystar. Only the corners that were
not subject to rounding by the inner or
outer roundness parameters are affected.
@Issue: https://github.com/thorvg/thorvg/issues/2230
When resetting back to animated property, system causes an UAF because frames have been freed.
Mark frames in nullptr at the case, so it doesn't use frame data after freed.
Issue: #2255
The display property, like any other node's style property,
should be part of a node style. This ensures its correct
copying and inheritance.
For the 'symbol' node, which is not rendered unless it is
used within a 'use' node, the display property can also be
applied. Because of that it cannot be utilized during scene
construction to determine whether the symbol is being defined
or used within a 'use' context.
this commit introduces an additional build options:
- lottie expressions: this advanced feature in Lottie can
significantly increase binary size. Users now have the option
to enable or disable it based on their requirements.
Note that, this change introduces one config definitions:
- THORVG_LOTTIE_EXPRESSIONS_SUPPORT
For angles close to multiples of pi/2, precision
based on FLT_EPSILON was insufficient. It either
led to the creation of an additional cubic segment
filled with erroneous values or NaNs, or it resulted
in the drawing of an angle for a sweep close to 0.
- disable unused builtin realm functions.
- disable global this
- disable regexp (potential)
- disable unicode case conversion (potential)
Some features are marked with (potential)
since we are not certain these are used practically.
until now, total binary size diff by expressions: +287kb
When the system fails to interpret the expression code,
it forcibly disables the feature per property.
This improvement enhances stability and performance
by avoiding reckless attempts to interpret JavaScript code.
When we confirm the full stability with expressions,
we can revert this code.