Struct scribl_curves::StrokeInProgress [−][src]
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]
&self,
ctx: &mut impl RenderContext,
style: StrokeStyle,
time: Time
)
Renders the part of this stroke that is visible at the time time
.
Trait Implementations
impl Clone for StrokeInProgress
[src]
fn clone(&self) -> StrokeInProgress
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Data for StrokeInProgress
[src]
impl Debug for StrokeInProgress
[src]
impl Default for StrokeInProgress
[src]
fn default() -> StrokeInProgress
[src]
Auto Trait Implementations
impl !RefUnwindSafe for StrokeInProgress
[src]
impl !Send for StrokeInProgress
[src]
impl !Sync for StrokeInProgress
[src]
impl Unpin for StrokeInProgress
[src]
impl !UnwindSafe for StrokeInProgress
[src]
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> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,