pub enum GridResolution {
Quarter,
Eighth,
Sixteenth,
ThirtySecond,
QuarterT,
EighthT,
SixteenthT,
}Variants§
Implementations§
Source§impl GridResolution
impl GridResolution
Sourcepub fn subdivisions_per_beat(self) -> f64
pub fn subdivisions_per_beat(self) -> f64
Fraction of a bar (4/4 time, 1 bar = column_count columns). This returns fraction relative to the full clip (0.0..1.0) when multiplied by (beats_per_bar / total_beats).
Sourcepub fn step_frac(self, total_beats: usize) -> f64
pub fn step_frac(self, total_beats: usize) -> f64
Grid step as a fraction of the total clip, given total beats.
Sourcepub fn snap(self, frac: f64, total_beats: usize) -> f64
pub fn snap(self, frac: f64, total_beats: usize) -> f64
Snap a fractional position to the nearest grid line.
pub fn label(self) -> &'static str
pub fn next(self) -> Self
pub fn prev(self) -> Self
Trait Implementations§
Source§impl Clone for GridResolution
impl Clone for GridResolution
Source§fn clone(&self) -> GridResolution
fn clone(&self) -> GridResolution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GridResolution
impl Debug for GridResolution
Source§impl PartialEq for GridResolution
impl PartialEq for GridResolution
impl Copy for GridResolution
impl Eq for GridResolution
impl StructuralPartialEq for GridResolution
Auto Trait Implementations§
impl Freeze for GridResolution
impl RefUnwindSafe for GridResolution
impl Send for GridResolution
impl Sync for GridResolution
impl Unpin for GridResolution
impl UnsafeUnpin for GridResolution
impl UnwindSafe for GridResolution
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