Struct sonogram::ColourGradient
source · pub struct ColourGradient { /* private fields */ }
Expand description
ColourGradient allows you to create custom colour gradients for each PNG created.
Implementations§
source§impl ColourGradient
impl ColourGradient
pub fn new() -> Self
pub fn create(theme: ColourTheme) -> Self
pub fn default_theme() -> Self
pub fn audacity_theme() -> Self
pub fn rainbow_theme() -> Self
pub fn black_white_theme() -> Self
pub fn white_black_theme() -> Self
pub fn get_colour(&self, value: f32) -> RGBAColour
pub fn to_legend(&self, width: usize, height: usize) -> Vec<RGBAColour> ⓘ
pub fn add_colour(&mut self, colour: RGBAColour)
pub fn set_max(&mut self, max: f32)
pub fn set_min(&mut self, min: f32)
Trait Implementations§
source§impl Clone for ColourGradient
impl Clone for ColourGradient
source§fn clone(&self) -> ColourGradient
fn clone(&self) -> ColourGradient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more