Struct waveform::misc::WaveformConfig
[−]
[src]
pub struct WaveformConfig { pub amp_min: f64, pub amp_max: f64, // some fields omitted }
Configurations for image generators.
It contains the following information:
- Range of the amplitudes to be rendered
- Foreground and background
Color
s to be used
Fields
amp_min: f64
amp_max: f64
Methods
impl WaveformConfig
[src]
fn new(
amp_min: f64,
amp_max: f64,
foreground: Color,
background: Color
) -> Result<Self, Box<Error>>
[src]
amp_min: f64,
amp_max: f64,
foreground: Color,
background: Color
) -> Result<Self, Box<Error>>
The constructor.
Arguments
amp_min
- Minimum value of amplitude to be renderedamp_max
- Maximum value of amplitude to be renderedforeground
- ForegroundColor
of the image, format must be consistent with background.background
- BackgroundColor
of the image, format must be consistent with foreground.
fn get_background(&self) -> Color
[src]
fn get_foreground(&self) -> Color
[src]
fn set_colors(
&mut self,
background: Color,
foreground: Color
) -> Result<(), Box<Error>>
[src]
&mut self,
background: Color,
foreground: Color
) -> Result<(), Box<Error>>
Sets Color
s.
Arguments
foreground
- ForegroundColor
of the image, format must be consistent with background.background
- BackgroundColor
of the image, format must be consistent with foreground.
Trait Implementations
impl Copy for WaveformConfig
[src]
impl Clone for WaveformConfig
[src]
fn clone(&self) -> WaveformConfig
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more