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) -> Self
pub fn new(period: Duration) -> Self
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) -> Self
pub fn rotation(period: Duration, from: Transformation) -> Self
Create a timed transformation that turns from clockwise, one full
turn per period.
Sourcepub fn from(self, transformation: Transformation) -> Self
pub fn from(self, transformation: Transformation) -> Self
Set the transformation at the start of each period.
Sourcepub fn to(self, transformation: Transformation) -> Self
pub fn to(self, transformation: Transformation) -> Self
Set the transformation reached at the end of each period.
Sourcepub fn with_easing(self, easing: Easing) -> Self
pub fn with_easing(self, easing: Easing) -> Self
Set the easing of every value.
Sourcepub fn with_scale_easing(self, easing: Easing) -> Self
pub fn with_scale_easing(self, easing: Easing) -> Self
Set the easing of the scale.
Sourcepub fn with_translation_easing(self, easing: Easing) -> Self
pub fn with_translation_easing(self, easing: Easing) -> Self
Set the easing of the translation.
Sourcepub fn with_rotation_easing(self, easing: Easing) -> Self
pub fn with_rotation_easing(self, easing: Easing) -> Self
Set the easing of the rotation.
Sourcepub fn with_alpha_easing(self, easing: Easing) -> Self
pub fn with_alpha_easing(self, easing: Easing) -> Self
Set the easing of the alpha.
Sourcepub fn alternate(self) -> Self
pub fn alternate(self) -> Self
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) -> Self
pub fn with_max_fps(self, max_fps: f32) -> Self
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
impl 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) -> Self
fn from(transformation: Transformation) -> Self
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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