pub struct GradientSampler {
pub points: usize,
pub margin_left: u32,
pub margin_right: u32,
pub margin_top: u32,
pub margin_bottom: u32,
pub maps: Vec<(String, BTreeMap<u32, RGBA32>)>,
}Expand description
A color interpolator that interpolates between colors in the RGB Color Space.
Fields§
§points: usizeThe number of points to sample from the gradient.
margin_left: u32The number of pixels to add to the left of the gradient.
margin_right: u32The number of pixels to add to the right of the gradient.
margin_top: u32The number of pixels to add to the top of the gradient.
margin_bottom: u32The number of pixels to add to the bottom of the gradient.
maps: Vec<(String, BTreeMap<u32, RGBA32>)>The gradient maps.
Implementations§
Source§impl GradientSampler
impl GradientSampler
Sourcepub fn with_margin(self, margin: u32) -> Self
pub fn with_margin(self, margin: u32) -> Self
Sourcepub fn export_hsv<P>(&self, path: P) -> ImageResult<()>
pub fn export_hsv<P>(&self, path: P) -> ImageResult<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GradientSampler
impl RefUnwindSafe for GradientSampler
impl Send for GradientSampler
impl Sync for GradientSampler
impl Unpin for GradientSampler
impl UnwindSafe for GradientSampler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more