Struct nannou_timeline::Ruler[][src]

pub struct Ruler {
    pub width_per_beat: Scalar,
    // some fields omitted
}

For converting a duration in bars to a viewable grid.

Fields

width_per_beat: Scalar

Implementations

impl Ruler[src]

pub fn new<T>(total_width: f64, desc: RangeDescription<T>) -> Ruler where
    T: Iterator<Item = TimeSig> + Clone
[src]

Constructor for a Ruler.

pub fn markers_in_ticks<I>(
    &self,
    bars: I,
    ppqn: Ppqn
) -> MarkersInTicks<WithStarts<I::IntoIter>> where
    I: IntoIterator<Item = TimeSig>,
    I::IntoIter: Clone
[src]

Produce an iterator that yields an iterator for each bar along with its start position in ticks.

pub fn markers_in_divisions<I>(
    &self,
    bars: I,
    ppqn: Ppqn
) -> MarkersInDivisions<WithStarts<I::IntoIter>> where
    I: IntoIterator<Item = TimeSig>,
    I::IntoIter: Clone
[src]

Produce an iterator that yields an iterator for each bar that yields each marker’s simplest division representation suitable for the Ruler.

pub fn marker_count<I>(&self, bars: I, ppqn: Ppqn) -> usize where
    I: IntoIterator<Item = TimeSig>,
    I::IntoIter: Clone
[src]

Produces the number of visible markers on the Ruler for the given bars.

pub fn ticks_per_width(&self, ppqn: Ppqn) -> Scalar[src]

The fractional number of ticks that may fit within one unit of space.

Trait Implementations

impl Clone for Ruler[src]

impl Copy for Ruler[src]

impl Debug for Ruler[src]

impl PartialEq<Ruler> for Ruler[src]

impl StructuralPartialEq for Ruler[src]

Auto Trait Implementations

impl RefUnwindSafe for Ruler

impl Send for Ruler

impl Sync for Ruler

impl Unpin for Ruler

impl UnwindSafe for Ruler

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Style for T where
    T: Any + Debug + PartialEq<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.