Struct sonogram::ColourGradient
source · [−]pub struct ColourGradient { /* private fields */ }
Expand description
ColourGradient allows you to create custom colour gradients for each PNG created.
Implementations
sourceimpl 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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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
sourceimpl Clone for ColourGradient
impl Clone for ColourGradient
sourcefn clone(&self) -> ColourGradient
fn clone(&self) -> ColourGradient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ColourGradient
impl Debug for ColourGradient
Auto Trait Implementations
impl RefUnwindSafe for ColourGradient
impl Send for ColourGradient
impl Sync for ColourGradient
impl Unpin for ColourGradient
impl UnwindSafe for ColourGradient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more