Add support for gradient strokes
This implements the gstroke and refactors a bit to share
the gradient code with gfill. This involves injecting a
QLottieGradientHolder class in the hierarchy using templates.
Note: After this, the 'c' (color) property is no longer
a required property of a stroke. We could still add this
in, but the only consequence is that a stroke that does
not define the color does not get a stroke (the color
will be (0, 0, 0, 0)) so it doesn't seem like it's worth
adding code specifically for that.
Fixes: QTBUG-140811
Change-Id: Ifb553bcf0f4b31f0ab3331bc588a6976c8dddc03
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| commit | 1021e32533233a266732d056b06f578a5d2c35e2 |
| parent | 4aa1e55f6d031b46d582322315974e012ce48452 |
| author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> |
| committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> |
| commit time | Thu, 12 Mar 2026 14:24:50 +0100 |
- M src/lottie/CMakeLists.txt
- M src/lottie/qlottiegfill.cpp
- M src/lottie/qlottiegfill_p.h
- A src/lottie/qlottiegradientholder.cpp
- A src/lottie/qlottiegradientholder_p.h
- A src/lottie/qlottiegstroke.cpp
- A src/lottie/qlottiegstroke_p.h
- M src/lottie/qlottieshape.cpp
- M src/lottie/qlottiestroke.cpp
- M src/lottie/qlottiestroke_p.h
- M src/lottie/renderer/qlottierenderer_p.h
- M src/lottiegenerator/qlottievisitor.cpp
- M src/lottiegenerator/qlottievisitor_p.h
- A tests/baseline/data/original/gstroke.json