Remove Builder abstractions for gradients

This commit is contained in:
Héctor Ramón Jiménez 2023-05-19 03:32:21 +02:00
parent 6551a0b2ab
commit 4c1a082f04
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
15 changed files with 167 additions and 213 deletions

View file

@ -317,7 +317,7 @@ fn pack_gradient(gradient: &core::Gradient, bounds: Rectangle) -> [f32; 44] {
core::Gradient::Linear(linear) => {
let mut pack: [f32; 44] = [0.0; 44];
for (index, stop) in linear.color_stops.iter().enumerate() {
for (index, stop) in linear.stops.iter().enumerate() {
let [r, g, b, a] =
stop.map_or(Color::default(), |s| s.color).into_linear();