pub struct ScalarKeyFrameAnimation(/* private fields */);Expand description
A key-frame animation that interpolates a scalar (f32) property (such as a
visual’s Opacity) through a series of key frames.
Implementations§
Source§impl ScalarKeyFrameAnimation
impl ScalarKeyFrameAnimation
Sourcepub fn insert_key_frame_with_easing(
&self,
progress: f32,
value: f32,
easing: &CompositionEasingFunction,
)
pub fn insert_key_frame_with_easing( &self, progress: f32, value: f32, easing: &CompositionEasingFunction, )
Inserts a key frame at progress (in 0.0..=1.0) that eases to value
along easing.
Sourcepub fn insert_expression_key_frame_with_easing(
&self,
progress: f32,
expression: &str,
easing: &CompositionEasingFunction,
)
pub fn insert_expression_key_frame_with_easing( &self, progress: f32, expression: &str, easing: &CompositionEasingFunction, )
Inserts a key frame at progress whose value is the composition
expression (for example "this.FinalValue"), eased along easing.
Sourcepub fn set_duration(&self, duration: Duration)
pub fn set_duration(&self, duration: Duration)
Sets how long one iteration of the animation takes.
Sourcepub fn set_target(&self, target: &str)
pub fn set_target(&self, target: &str)
Sets the property this animation targets when used as an implicit
animation (for example "Opacity").
Trait Implementations§
Source§impl Animation for ScalarKeyFrameAnimation
impl Animation for ScalarKeyFrameAnimation
Source§fn as_animation(&self) -> CompositionAnimation
fn as_animation(&self) -> CompositionAnimation
Returns this animation as the shared
CompositionAnimation base type.Source§impl Clone for ScalarKeyFrameAnimation
impl Clone for ScalarKeyFrameAnimation
Source§fn clone(&self) -> ScalarKeyFrameAnimation
fn clone(&self) -> ScalarKeyFrameAnimation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ScalarKeyFrameAnimation
impl RefUnwindSafe for ScalarKeyFrameAnimation
impl Send for ScalarKeyFrameAnimation
impl Sync for ScalarKeyFrameAnimation
impl Unpin for ScalarKeyFrameAnimation
impl UnsafeUnpin for ScalarKeyFrameAnimation
impl UnwindSafe for ScalarKeyFrameAnimation
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