diff options
author | 2022-10-07 16:55:55 -0700 | |
---|---|---|
committer | 2022-10-07 16:55:55 -0700 | |
commit | fd5e1e5ab0b712cd6719733b5a68602176ae5ec4 (patch) | |
tree | 40c054f30aaebb1befeb25fb8852fd1fe70402b8 /graphics/src/gradient.rs | |
parent | a4a1262fa2d625be5ad7a37e409e0e9c399b09b6 (diff) | |
download | iced-fd5e1e5ab0b712cd6719733b5a68602176ae5ec4.tar.gz iced-fd5e1e5ab0b712cd6719733b5a68602176ae5ec4.tar.bz2 iced-fd5e1e5ab0b712cd6719733b5a68602176ae5ec4.zip |
Adjusted gradient transform function to be more readable.
Diffstat (limited to 'graphics/src/gradient.rs')
-rw-r--r-- | graphics/src/gradient.rs | 8 |
1 files changed, 1 insertions, 7 deletions
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<Position>) -> 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) - } - } } |