Struct scribl_curves::StrokeInProgress[][src]

pub struct StrokeInProgress { /* fields omitted */ }

While drawing, this stores one continuous poly-line (from pen-down to pen-up). Because we expect lots of fast changes to this, it uses interior mutability to avoid repeated allocations.

Implementations

impl StrokeInProgress[src]

pub fn add_point(&mut self, p: Point, t: Time)[src]

Adds a point, drawn at the given time (which must be at or after the previous last time).

Panics

Panics if t is too soon.

pub fn last_point(&self) -> Option<Point>[src]

Returns the last point in the stroke.

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

Returns the time of the first point in the stroke.

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

Renders the part of this stroke that is visible at the time time.

Trait Implementations

impl Clone for StrokeInProgress[src]

impl Data for StrokeInProgress[src]

impl Debug for StrokeInProgress[src]

impl Default for StrokeInProgress[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> 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.