Trait nannou::ui::prelude::widget::envelope_editor::EnvelopePoint [−][src]
pub trait EnvelopePoint: PartialEq<Self> + Clone { type X: ToString + Float; type Y: ToString + Float; fn get_x(&self) -> Self::X; fn get_y(&self) -> Self::Y; fn set_x(&mut self, _x: Self::X); fn set_y(&mut self, _y: Self::Y); fn new(_x: Self::X, _y: Self::Y) -> Self; fn get_curve(&self) -> f32 { ... } fn set_curve(&mut self, _curve: f32) { ... } }
EnvPoint
must be implemented for any type that is used as a 2D point within the
EnvelopeEditor.
Associated Types
type X: ToString + Float
A value on the X-axis of the envelope.
type Y: ToString + Float
A value on the Y-axis of the envelope.
Required Methods
fn get_x(&self) -> Self::X
Return the X value.
fn get_y(&self) -> Self::Y
Return the Y value.
fn set_x(&mut self, _x: Self::X)
Set the X value.
fn set_y(&mut self, _y: Self::Y)
Set the Y value.
fn new(_x: Self::X, _y: Self::Y) -> Self
Create a new EnvPoint.
Provided Methods
fn get_curve(&self) -> f32
Return the bezier curve depth (-1. to 1.) for the next interpolation.
fn set_curve(&mut self, _curve: f32)
Set the bezier curve depth (-1. to 1.) for the next interpolation.
Implementations on Foreign Types
impl EnvelopePoint for [f64; 2]
[src]
impl EnvelopePoint for [f64; 2]
type X = f64
type Y = f64
fn get_x(&self) -> f64
[src]
fn get_x(&self) -> f64
Return the X value.
fn get_y(&self) -> f64
[src]
fn get_y(&self) -> f64
Return the Y value.
fn set_x(&mut self, x: f64)
[src]
fn set_x(&mut self, x: f64)
Return the X value.
fn set_y(&mut self, y: f64)
[src]
fn set_y(&mut self, y: f64)
Return the Y value.
fn new(x: f64, y: f64) -> [f64; 2]
[src]
fn new(x: f64, y: f64) -> [f64; 2]
Create a new Envelope Point.
fn get_curve(&self) -> f32
[src]
fn get_curve(&self) -> f32
fn set_curve(&mut self, _curve: f32)
[src]
fn set_curve(&mut self, _curve: f32)