Commit graph

13 commits

Author SHA1 Message Date
Mira Grudzinska
a821ef2b99 lotttie: added pucker/bloat support 2025-06-12 01:33:15 +02:00
Mira Grudzinska
1833bbfd12 lottie: allow modifiers in any order
Previously, the rounding modifier was always applied
first, which led to incorrect results when a different
modifier order was expected.
This update removes that limitation and enables modifiers
to be applied in any order.

Additionally, the code now prevents an infinite loop that
occurred when the rounded corners modifier was applied
multiple times (a cycle where next was set to this).
2025-06-12 01:13:23 +02:00
Mira Grudzinska
0f9e10299e lottie: enhance rounded corners modifier
Added support for LineTo path commands in the rounding
corners modifier algorithm. This is necessary to allow
other modifiers to be applied before rounding, as previously
only CubicTo segments from the original lottie data were
handled.
2025-06-12 01:07:52 +02:00
Mira Grudzinska
01313592d8 lottie: readability++
Introduce the _colinear function - checks if a Bezier curve
is degenerated to a line.
2025-06-12 01:07:25 +02:00
Hermet Park
2a4dfcd10e lottie: revised the shape modifiers
- use a decoration style for path-modification chaining.
- use a reusable buffer for intermediate path generation.
2025-02-06 12:21:16 +09:00
Hermet Park
f4a2c922be lottie: minor optimization
use a reusable buffer for intermediate path generation.
2025-02-06 12:21:16 +09:00
Hermet Park
4edaf311c6 lottie: ++compact & neat code
introduced RenderPath to minimize the path parameters.
2025-02-05 19:55:12 +09:00
Hermet Park
35dac266dd lottie: neat code++ 2025-02-05 15:15:01 +09:00
Hermet Park
a12accbc93 updated copyright 2025-01-03 14:32:31 +09:00
Mira Grudzinska
dfd7693158 lottie: offset does not depend on shape direction
According to tests in AE, the offset direction should
not depend on the direction of the shape. A positive
offset value expands the shape, while a negative value
contracts it. Fixed.
2024-10-18 18:02:35 +09:00
Mira Grudzinska
78285e1cfd lottie: fix offset
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.
2024-10-18 12:09:45 +09:00
Mira Grudzinska
87d85047aa lottie: add offsetPath support
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
2024-08-23 01:18:50 +09:00
Mira Grudzinska
e4ec2a8a0e lottie: roundness refactored based on #2295 2024-08-23 01:18:50 +09:00