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]
T: Iterator<Item = TimeSig> + Clone,
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]
&self,
bars: I,
ppqn: Ppqn
) -> MarkersInTicks<WithStarts<I::IntoIter>> where
I: IntoIterator<Item = TimeSig>,
I::IntoIter: Clone,
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]
&self,
bars: I,
ppqn: Ppqn
) -> MarkersInDivisions<WithStarts<I::IntoIter>> where
I: IntoIterator<Item = TimeSig>,
I::IntoIter: Clone,
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]
I: IntoIterator<Item = TimeSig>,
I::IntoIter: Clone,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Style for T where
T: Any + Debug + PartialEq<T>,
[src]
T: Any + Debug + PartialEq<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,