summaryrefslogtreecommitdiffstats
path: root/core/src/gradient.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-29 22:28:31 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-11-29 22:28:31 +0100
commite09b4e24dda51b8212d8ece52431dacaa3922a7b (patch)
tree7005e181528134ebdde5bbbe5909273db9f30174 /core/src/gradient.rs
parent83c7870c569a2976923ee6243a19813094d44673 (diff)
parent7f8b17604a31e00becc43130ec516c1a53552c88 (diff)
downloadiced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.tar.gz
iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.tar.bz2
iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.zip
Merge branch 'master' into feat/multi-window-support
Diffstat (limited to 'core/src/gradient.rs')
-rw-r--r--core/src/gradient.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/src/gradient.rs b/core/src/gradient.rs
index e19622fb..4711b044 100644
--- a/core/src/gradient.rs
+++ b/core/src/gradient.rs
@@ -6,10 +6,8 @@ use std::cmp::Ordering;
#[derive(Debug, Clone, Copy, PartialEq)]
/// A fill which transitions colors progressively along a direction, either linearly, radially (TBD),
/// or conically (TBD).
-///
-/// For a gradient which can be used as a fill on a canvas, see [`iced_graphics::Gradient`].
pub enum Gradient {
- /// A linear gradient interpolates colors along a direction at a specific [`Angle`].
+ /// A linear gradient interpolates colors along a direction at a specific angle.
Linear(Linear),
}
@@ -96,8 +94,8 @@ impl Linear {
mut self,
stops: impl IntoIterator<Item = ColorStop>,
) -> Self {
- for stop in stops.into_iter() {
- self = self.add_stop(stop.offset, stop.color)
+ for stop in stops {
+ self = self.add_stop(stop.offset, stop.color);
}
self