pub struct RelativePointAnimator { /* private fields */ }Expand description
Animator that handles RelativePoint properties.
Implementations§
Source§impl RelativePointAnimator
impl RelativePointAnimator
pub fn new() -> Self
Sourcepub fn interpolate_core(
progress: f64,
old_value: &RelativePoint,
new_value: &RelativePoint,
) -> RelativePoint
pub fn interpolate_core( progress: f64, old_value: &RelativePoint, new_value: &RelativePoint, ) -> RelativePoint
Interpolates between two values using the specified progress.
Trait Implementations§
Source§impl Animator for RelativePointAnimator
impl Animator for RelativePointAnimator
Source§type Value = RelativePoint
type Value = RelativePoint
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 interpolate(
&self,
progress: f64,
old_value: &RelativePoint,
new_value: &RelativePoint,
) -> RelativePoint
fn interpolate( &self, progress: f64, old_value: &RelativePoint, new_value: &RelativePoint, ) -> RelativePoint
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.
Source§fn apply(
this: &Rc<Self>,
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( this: &Rc<Self>, 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
control: it runs while match_ is true.Auto Trait Implementations§
impl !Freeze for RelativePointAnimator
impl !RefUnwindSafe for RelativePointAnimator
impl !Send for RelativePointAnimator
impl !Sync for RelativePointAnimator
impl !UnwindSafe for RelativePointAnimator
impl Unpin for RelativePointAnimator
impl UnsafeUnpin for RelativePointAnimator
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.