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