Struct scribl_curves::StrokeSeq [−][src]
A StrokeSeq
is a sequence of strokes, each of which is a continuous curve. Each stroke can
have its own style (thickness, color, effects). The strokes in a StrokeSeq
are non-decreasing
in time: one stroke ends before another begins.
Implementations
impl StrokeSeq
[src]
pub fn new() -> StrokeSeq
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn first_time(&self) -> Time
[src]
Returns time at which the first segment in the first stroke was drawn. Panics if this sequence is empty.
pub fn last_time(&self) -> Time
[src]
Returns time at which the last segment in the last stroke was drawn. Panics if this sequence is empty.
pub fn append_stroke(
&mut self,
stroke: StrokeInProgress,
style: StrokeStyle,
distance_threshold: f64,
angle_threshold: f64
)
[src]
&mut self,
stroke: StrokeInProgress,
style: StrokeStyle,
distance_threshold: f64,
angle_threshold: f64
)
Appends a StrokeInProgress
to this stroke sequence.
distance_threshold
and angle_threshold
are parameters that control the simplification
and smoothing that we apply to the incoming points.
Panics
Panics if stroke
starts before the last existing stroke ends.
pub fn strokes<'a>(&'a self) -> impl Iterator<Item = StrokeRef<'a>> + 'a
[src]
Returns an iterator over all the strokes in this sequence.
pub fn render(&self, ctx: &mut impl RenderContext, time: Time)
[src]
Renders the part of this stroke sequence that is visible at time time
.
Trait Implementations
impl Clone for StrokeSeq
[src]
impl Debug for StrokeSeq
[src]
impl Default for StrokeSeq
[src]
impl<'a> Deserialize<'a> for StrokeSeq
[src]
fn deserialize<D: Deserializer<'a>>(de: D) -> Result<StrokeSeq, D::Error>
[src]
impl From<StrokeSeq> for StrokeSeq
[src]
impl Serialize for StrokeSeq
[src]
Auto Trait Implementations
impl RefUnwindSafe for StrokeSeq
[src]
impl Send for StrokeSeq
[src]
impl Sync for StrokeSeq
[src]
impl Unpin for StrokeSeq
[src]
impl UnwindSafe for StrokeSeq
[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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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>,