Remove Builder abstractions for gradients
This commit is contained in:
parent
6551a0b2ab
commit
4c1a082f04
15 changed files with 167 additions and 213 deletions
|
|
@ -631,7 +631,7 @@ fn pack_gradient(gradient: &Gradient) -> [f32; 44] {
|
|||
let mut pack: [f32; 44] = [0.0; 44];
|
||||
let mut offsets: [f32; 8] = [2.0; 8];
|
||||
|
||||
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(crate::core::Color::default(), |s| s.color)
|
||||
.into_linear();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue