pub struct TransformAnimator { /* private fields */ }Expand description
Animator that handles f64 properties of Transforms: redirects the
animation to the matching transform in the render transform of the
animated visual, creating a default render transform if there is none.
Implementations§
Trait Implementations§
Source§impl Animator for TransformAnimator
impl Animator for TransformAnimator
Source§type Value = f64
type Value = f64
The type of the values the animator produces, which is the value
type of the properties it animates.
Source§fn base(&self) -> &AnimatorBase
fn base(&self) -> &AnimatorBase
The key frames and the target property.
Source§fn apply(
this: &Rc<Self>,
animation: &Animation,
control: &Animatable,
clock: Option<Rc<dyn IClock>>,
obs_match: Rc<dyn IObservable<bool>>,
on_complete: Option<Rc<dyn Fn()>>,
should_pause_on_invisible: bool,
) -> Option<Rc<dyn IDisposable>>
fn apply( this: &Rc<Self>, animation: &Animation, control: &Animatable, clock: Option<Rc<dyn IClock>>, obs_match: Rc<dyn IObservable<bool>>, on_complete: Option<Rc<dyn Fn()>>, should_pause_on_invisible: bool, ) -> Option<Rc<dyn IDisposable>>
Applies the animation to
control: it runs while match_ is true.Source§fn interpolate(&self, _progress: f64, _old_value: &f64, _new_value: &f64) -> f64
fn interpolate(&self, _progress: f64, _old_value: &f64, _new_value: &f64) -> f64
Interpolates between two values using the specified progress.
Source§fn typed_value(&self, untyped: &dyn AnyValue) -> Option<Self::Value>
fn typed_value(&self, untyped: &dyn AnyValue) -> Option<Self::Value>
Reads a key frame value;
None when it is not a value this animator
can animate, in which case the neutral value is used in its place.Source§fn validate(&self, _item: &Ref<AnimatorKeyFrame>)
fn validate(&self, _item: &Ref<AnimatorKeyFrame>)
Validates a key frame that is being added. Panics to reject it.
Source§fn bind_animation(
&self,
control: &Animatable,
instance: Rc<dyn IObservable<Self::Value>>,
) -> Rc<dyn IDisposable>
fn bind_animation( &self, control: &Animatable, instance: Rc<dyn IObservable<Self::Value>>, ) -> Rc<dyn IDisposable>
Binds the values a running animation produces to the target property
of the control, at animation priority.
Auto Trait Implementations§
impl !Freeze for TransformAnimator
impl !RefUnwindSafe for TransformAnimator
impl !Send for TransformAnimator
impl !Sync for TransformAnimator
impl !UnwindSafe for TransformAnimator
impl Unpin for TransformAnimator
impl UnsafeUnpin for TransformAnimator
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read moreSource§impl<A> IAnimator for Awhere
A: Animator,
impl<A> IAnimator for Awhere
A: Animator,
Source§fn property(&self) -> Option<&'static FerroProperty>
fn property(&self) -> Option<&'static FerroProperty>
The target property.
fn set_property(&self, value: Option<&'static FerroProperty>)
Source§fn get(&self, index: usize) -> Ref<AnimatorKeyFrame>
fn get(&self, index: usize) -> Ref<AnimatorKeyFrame>
The key frame at
index. Panics when out of range.Source§fn add(&self, item: Ref<AnimatorKeyFrame>)
fn add(&self, item: Ref<AnimatorKeyFrame>)
Adds a key frame. Key frames are expected in cue order.
Source§fn animator_type(&self) -> TypeId
fn animator_type(&self) -> TypeId
The type of the animator, by which key frames find their animator.
Source§fn apply(
self: Rc<A>,
animation: &Animation,
control: &Animatable,
clock: Option<Rc<dyn IClock>>,
match_: Rc<dyn IObservable<bool>>,
on_complete: Option<Rc<dyn Fn()>>,
should_pause_on_invisible: bool,
) -> Option<Rc<dyn IDisposable>>
fn apply( self: Rc<A>, animation: &Animation, control: &Animatable, clock: Option<Rc<dyn IClock>>, match_: Rc<dyn IObservable<bool>>, on_complete: Option<Rc<dyn Fn()>>, should_pause_on_invisible: bool, ) -> Option<Rc<dyn IDisposable>>
Applies the animation to a control: the animation runs while
match_ is true.