Struct color_gradient::utils::sampler::GradientSampler
source · 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>)>,
}Fields§
§points: usize§margin_left: u32§margin_right: u32§margin_top: u32§margin_bottom: u32§maps: Vec<(String, BTreeMap<u32, RGBA32>)>Implementations§
source§impl GradientSampler
impl GradientSampler
pub fn new(points: usize) -> Self
pub fn with_margin(self, margin: u32) -> Self
pub fn sample(&self, image: &Rgba32FImage) -> BTreeMap<u32, RGBA32>
pub fn sample_file<P>( &mut self, path: P, name: &str ) -> Result<(), Box<dyn Error>>where P: AsRef<Path>,
pub fn export_hsv<P>(&self, path: P) -> ImageResult<()>where P: AsRef<Path>,
Auto Trait Implementations§
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