pub struct TimedTransformation { /* private fields */ }Expand description
A Transformation that repeatedly moves from one pose to another over a
period, for Svg::with_timed_transformation.
Each value of the transformation has its own Easing, so for example an
SVG can grow quickly at first while fading at a constant rate.
Implementations§
Source§impl TimedTransformation
impl TimedTransformation
Sourcepub fn new(period: Duration) -> TimedTransformation
pub fn new(period: Duration) -> TimedTransformation
Create a timed transformation that repeats every period. It animates
nothing until Self::from and Self::to differ.
Sourcepub fn rotation(period: Duration, from: Transformation) -> TimedTransformation
pub fn rotation(period: Duration, from: Transformation) -> TimedTransformation
Create a timed transformation that turns from clockwise, one full
turn per period.
Sourcepub fn from(self, transformation: Transformation) -> TimedTransformation
pub fn from(self, transformation: Transformation) -> TimedTransformation
Set the transformation at the start of each period.
Sourcepub fn to(self, transformation: Transformation) -> TimedTransformation
pub fn to(self, transformation: Transformation) -> TimedTransformation
Set the transformation reached at the end of each period.
Sourcepub fn with_easing(self, easing: Easing) -> TimedTransformation
pub fn with_easing(self, easing: Easing) -> TimedTransformation
Set the easing of every value.
Sourcepub fn with_scale_easing(self, easing: Easing) -> TimedTransformation
pub fn with_scale_easing(self, easing: Easing) -> TimedTransformation
Set the easing of the scale.
Sourcepub fn with_translation_easing(self, easing: Easing) -> TimedTransformation
pub fn with_translation_easing(self, easing: Easing) -> TimedTransformation
Set the easing of the translation.
Sourcepub fn with_rotation_easing(self, easing: Easing) -> TimedTransformation
pub fn with_rotation_easing(self, easing: Easing) -> TimedTransformation
Set the easing of the rotation.
Sourcepub fn with_alpha_easing(self, easing: Easing) -> TimedTransformation
pub fn with_alpha_easing(self, easing: Easing) -> TimedTransformation
Set the easing of the alpha.
Sourcepub fn alternate(self) -> TimedTransformation
pub fn alternate(self) -> TimedTransformation
Move from the start to the end and back again within each period, instead of jumping back to the start.
Sourcepub fn with_max_fps(self, max_fps: f32) -> TimedTransformation
pub fn with_max_fps(self, max_fps: f32) -> TimedTransformation
Present at most max_fps frames per second while nothing but timed
transformations needs a frame. The least restrictive limit in a window
wins. Values that are not finite and positive are ignored.
Trait Implementations§
Source§impl Clone for TimedTransformation
impl Clone for TimedTransformation
Source§fn clone(&self) -> TimedTransformation
fn clone(&self) -> TimedTransformation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TimedTransformation
Source§impl Debug for TimedTransformation
impl Debug for TimedTransformation
Source§impl From<Transformation> for TimedTransformation
impl From<Transformation> for TimedTransformation
Source§fn from(transformation: Transformation) -> TimedTransformation
fn from(transformation: Transformation) -> TimedTransformation
A timed transformation that stays at transformation.
Source§impl PartialEq for TimedTransformation
impl PartialEq for TimedTransformation
impl StructuralPartialEq for TimedTransformation
Auto Trait Implementations§
impl Forget for TimedTransformation
impl Freeze for TimedTransformation
impl Move for TimedTransformation
impl RefUnwindSafe for TimedTransformation
impl Send for TimedTransformation
impl Sync for TimedTransformation
impl Unpin for TimedTransformation
impl UnsafeUnpin for TimedTransformation
impl UnwindSafe for TimedTransformation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more