- Implement @conic-gradient(color angle, ...) syntax
- Center is always at rectangle center (no center_x/center_y parameters)
- 0 degrees starts at north (12 o'clock position)
- Support Slint angle units: deg, rad, turn
- Software renderer: Full native implementation
- Qt backend: Native support with angle offset correction
- Skia backend: Native support with angle offset correction
- FemtoVG backend: Fallback to solid color (first gradient stop)
ChangeLog: Added support for `@conic-gradient`
Fixes#3957
Previously, the software renderer only supported linear gradients, with
radial gradients falling back to solid colors. This commit adds full
radial gradient rendering support.
Rename gradient-related types for clarity:
- GradientCommand → LinearGradientCommand
- gradients → linear_gradients
- draw_gradient_line → draw_linear_gradient
- process_gradient → process_linear_gradient
* tests: Add comprehensive screenshot tests for radial gradients
Add test cases for radial gradients including:
- Basic radial gradient with transparency overlay
- Multiple color stops with specific percentages
- Gradient stops beyond 100% range
- Overlapping transparent gradients with alpha blending
- Multiple stops at same position for sharp color transitions
- Edge case with invisible stop at 0%
ROTATION_THRESHOLD set to 600 due to imprecision in gradient calculations
during rotation transformations.
Instead of using datastructure that are tailored to our line by line
renderer and draw functions, use more generic and future proof data that
are easier to handle by hardware accelerator, and may be easier to
stabilize.
The screenshots from the screenshots test have to be re-done
because the rounding is different
Note: the C++ API DrawTextureArgs is not exposed yet
And call `extern crate std` when the feature is enabled.
I've read this is the good practice on how to do it.
So that the std prelude is no longer included automatically.
There is then less difference between std and and no-std build which
should avoid surprises in the CI when we use things from the prelude.
The downside is that there is a bit of churn in the tests