pub struct CurveEditorViewState {
pub time_offset: f64,
pub time_scale: f64,
pub value_offset: f32,
pub value_scale: f32,
pub selected_keys: HashSet<(usize, usize)>,
pub snap_time: bool,
pub snap_value: bool,
pub snap_interval: f64,
pub show_tangents: bool,
pub tangent_length: f32,
}Fields§
§time_offset: f64§time_scale: f64§value_offset: f32§value_scale: f32§selected_keys: HashSet<(usize, usize)>§snap_time: bool§snap_value: bool§snap_interval: f64§show_tangents: bool§tangent_length: f32Implementations§
Source§impl CurveEditorViewState
impl CurveEditorViewState
pub fn new() -> Self
pub fn time_to_pixel(&self, time: f64) -> f32
pub fn pixel_to_time(&self, px: f32) -> f64
pub fn value_to_pixel(&self, val: f32) -> f32
pub fn pixel_to_value(&self, py: f32) -> f32
pub fn zoom_time(&mut self, factor: f64, pivot_px: f32)
pub fn zoom_value(&mut self, factor: f32, pivot_py: f32)
pub fn frame_all( &mut self, t_start: f64, t_end: f64, v_min: f32, v_max: f32, width: f32, height: f32, )
pub fn select_all(&mut self, track_count: usize, key_counts: &[usize])
Auto Trait Implementations§
impl Freeze for CurveEditorViewState
impl RefUnwindSafe for CurveEditorViewState
impl Send for CurveEditorViewState
impl Sync for CurveEditorViewState
impl Unpin for CurveEditorViewState
impl UnsafeUnpin for CurveEditorViewState
impl UnwindSafe for CurveEditorViewState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.