Struct scribl_curves::DrawSnippet [−][src]
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]
fn clone(&self) -> DrawSnippet
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Data for DrawSnippet
[src]
impl Debug for DrawSnippet
[src]
impl<'de> Deserialize<'de> for DrawSnippet
[src]
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<DrawSnippet, D::Error>
[src]
impl From<DrawSnippet> for DrawSnippet
[src]
fn from(data: DrawSnippet) -> DrawSnippet
[src]
impl Serialize for DrawSnippet
[src]
Auto Trait Implementations
impl RefUnwindSafe for DrawSnippet
[src]
impl Send for DrawSnippet
[src]
impl Sync for DrawSnippet
[src]
impl Unpin for DrawSnippet
[src]
impl UnwindSafe for DrawSnippet
[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>,