The error was visible when multiple shapes were
simultaneously trimmed. The length of a single
shape was zeroed out only in selected cases,
which caused accumulation that could lead to
incorrect extension of the variable determining
the maximum length.
@issue: https://github.com/thorvg/thorvg/issues/2173
The string passed to the svg parser is not guaranteed to always be a valid string.
Certain strings may have numbers that cannot be converted.
Therefore, make sure to check whether the converted value is in the appropriate range before returning.
related issue: https://github.com/thorvg/thorvg/issues/2078#issuecomment-2037495121
Because memcpy() is not guaranteed to copy null at the end of the data array,
it increase the size by 1 and add null
This prevents invalid access of string functions in parser.
Since blit msaa framebuffer to another msaa framebuffer may generate
GLError in some platforms. Use normal texture rendering to blit the final
color buffer onto target framebuffer.
Note that this change renames the Meson option from 'vector' to 'simd',
separates the NEON types into 'neon-arm' and 'neon-aarch',
and designates the 'mfpu' option solely for 'neon-arm'.
A single animation might have a desinated markers with naming: 0 ~ 0.5 (sector A), 0.5 ~ 1.0 (sector B). Selecting one of them using a marker name(sector A) and could play only that part with animation controllers.
usage:
- `animation->segment("sectionA") // Named segment(Marker)`
- `auto cnt = animation->markerCnt()`
- `auto name = animation->markers(index)`
- `animation->segment(0, 0.5) // Segment`
- `animation->segment(&begin, &end)`
Co-authored-by: Jinny You <jinny@lottiefiles.com>
If the command after `m` is not recognized, it must be recognized as `l` or `L`.
However, if it is not recognized after ending with `z`, all commands after it are ignored.
```
<svg width="100" version="1.0" xmlns="http://www.w3.org/2000/svg" height="100" xmlns:xlink="http://www.w3.org/1999/xlink">
<path style="stroke:#F00" d="m 20,20 0,50 50 0 -50 -50 z 70,70 0,50 50 0 -50 -50 z "/>
</svg>
```
Currently, tvg ignores the frame value if the difference
is less than 0.001. In most cases, updating the frames
when the change is less than 1ms is just an unnecessary
burden on the system.
Instead, this ensures that the perfect last frame is reached.
issue: https://github.com/thorvg/thorvg/issues/2147
[issues 1479: lottie](#1479)
Vertex, Index and uniform buffers now updates instead of recreate.
Implemented pools form mesh objects and render shapes data
it increase performance in 30-40% in massive animations scenes
GL might need to generate a default target FBO
when the given target ID indicates the main surface.
However, users may want to draw visuals directly onto the main surface.
This policy must be reviewed thoroughly.
re-implement the gif conversion function with the correct approach.
The input data is not reusable as it undergoes modifications during parsing.
To address this, the function now creates a backup of the original data for use in GIF conversion.
This also resolves issues where the GIF viewport was incorrectly matched.
This implementation may be revisited upon
the availability of Animation::duplicate().
The Lottie loader now utilizes an individual scene instance per loader.
This guarantees that each instance retains a unique frame number,
essential for maintaining the integrity of animation states.
As a result, sharing loaders between Lottie animations is prohibited
to uphold frame context isolation.
This may be subject to optimization review in the future.