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

@ -463,7 +463,7 @@ fn into_gradient<'a>(
let Gradient::Linear(linear) = gradient;
let (start, end) = linear.angle.to_distance(&bounds);
let stops: Vec<tiny_skia::GradientStop> = linear
.color_stops
.stops
.into_iter()
.flatten()
.map(|stop| {

View file

@ -233,7 +233,7 @@ pub fn into_paint(style: Style) -> tiny_skia::Paint<'static> {
Style::Gradient(gradient) => match gradient {
Gradient::Linear(linear) => {
let stops: Vec<tiny_skia::GradientStop> = linear
.color_stops
.stops
.into_iter()
.flatten()
.map(|stop| {