[−][src]Trait cichlid::prelude::GradientFillToInclusive
Fills an iterable object with a gradient from the HSV
values start
to finish
, inclusive of the
finish
.
Examples
use cichlid::{prelude::*, ColorRGB, HSV, GradientDirection}; let mut colors = [ColorRGB::Black; 80]; let start = HSV::new(130, 200, 251); let end = HSV::new(206, 100, 255); colors.gradient_fill_to_inclusive(start, end, GradientDirection::Shortest); assert_eq!(*colors.last().unwrap(), ColorRGB::from(end));
Required methods
fn gradient_fill_to_inclusive(
self,
start: HSV,
end: HSV,
dir: GradientDirection
)
self,
start: HSV,
end: HSV,
dir: GradientDirection
)
Fills a gradient from two HSV's using linear interpolation between the two, inclusive of the end HSV.
Implementors
impl<'a, T, H: 'a> GradientFillToInclusive for T where
T: IntoIterator<Item = &'a mut H>,
T::IntoIter: ExactSizeIterator + DoubleEndedIterator,
H: From<HSV>,
[src]
T: IntoIterator<Item = &'a mut H>,
T::IntoIter: ExactSizeIterator + DoubleEndedIterator,
H: From<HSV>,
fn gradient_fill_to_inclusive(
self,
start: HSV,
end: HSV,
dir: GradientDirection
)
[src]
self,
start: HSV,
end: HSV,
dir: GradientDirection
)