From fd5e1e5ab0b712cd6719733b5a68602176ae5ec4 Mon Sep 17 00:00:00 2001 From: shan Date: Fri, 7 Oct 2022 16:55:55 -0700 Subject: Adjusted gradient transform function to be more readable. --- graphics/src/gradient.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'graphics/src/gradient.rs') diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index 1446d7cf..da0f911d 100644 --- a/graphics/src/gradient.rs +++ b/graphics/src/gradient.rs @@ -2,7 +2,7 @@ mod linear; pub use crate::gradient::linear::{Linear, Location, Position}; -use crate::{Color, Point}; +use crate::Color; #[derive(Debug, Clone, PartialEq)] /// A fill which transitions colors progressively along a direction, either linearly, radially (TBD), @@ -27,10 +27,4 @@ impl Gradient { pub fn linear(position: impl Into) -> linear::Builder { linear::Builder::new(position.into()) } - - pub(crate) fn coords(&mut self) -> (&mut Point, &mut Point) { - match self { - Gradient::Linear(gradient) => (&mut gradient.start, &mut gradient.end) - } - } } -- cgit