Struct scribl_curves::DrawSnippet[][src]

pub struct DrawSnippet { /* fields omitted */ }

A snippet is a sequence of strokes, possibly modified by a time distortion.

This struct implements druid::Data. In particular, it is cheap to clone: most of the actual data lives behind shared references.

Implementations

impl DrawSnippet[src]

pub fn new(strokes: StrokeSeq) -> DrawSnippet[src]

pub fn strokes<'a>(&'a self) -> impl Iterator<Item = StrokeRef<'a>>[src]

pub fn end_time(&self) -> Option<Time>[src]

Returns the time at which this snippet should cease to be visible, or None if the snippet should always be visible.

pub fn with_new_lerp(&self, lerp_from: Time, lerp_to: Time) -> DrawSnippet[src]

pub fn key_times(&self) -> &[Time][src]

pub fn visible_at(&self, time: Time) -> bool[src]

Has this snippet drawn anything by time?

pub fn shifted(&self, shift: TimeDiff) -> DrawSnippet[src]

pub fn start_time(&self) -> Time[src]

pub fn last_draw_time(&self) -> Time[src]

The last time at which the snippet changed.

pub fn render(&self, ctx: &mut impl RenderContext, time: Time)[src]

Trait Implementations

impl Clone for DrawSnippet[src]

impl Data for DrawSnippet[src]

impl Debug for DrawSnippet[src]

impl<'de> Deserialize<'de> for DrawSnippet[src]

impl From<DrawSnippet> for DrawSnippet[src]

impl Serialize for DrawSnippet[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

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.