KeyFrameAnimation
struct · ferroui-base · v0.5.0
struct KeyFrameAnimation
A time-based animation with one or more key frames. These frames are markers, allowing developers to specify values at specific times for the animating property. KeyFrame animations can be further customized by specifying how the animation interpolates between keyframes.
The classes for the value types (ScalarKeyFrameAnimation,
Vector3KeyFrameAnimation, ...) embed it and dereference to it; they are
expanded from the key frame animations of the composition schema at the
end of this module.
Members
delay_behaviorset_delay_behaviordelay_timeset_delay_timedirectionset_directiondurationset_durationiteration_behaviorset_iteration_behavioriteration_countset_iteration_countstop_behaviorset_stop_behaviorkey_frame_countinsert_expression_key_frame
delay_behavior
fn delay_behavior(self: &Self) -> AnimationDelayBehavior
The delay behavior of the key frame animation.
set_delay_behavior
fn set_delay_behavior(self: &Self, value: AnimationDelayBehavior)
delay_time
fn delay_time(self: &Self) -> Duration
Delay before the animation starts after start_animation is called.
set_delay_time
fn set_delay_time(self: &Self, value: Duration)
direction
fn direction(self: &Self) -> PlaybackDirection
The direction the animation is playing.
The Direction property allows you to drive your animation from start to end or end to start or alternate
between start and end or end to start if animation has an iteration_count greater than one.
This gives an easy way for customizing animation definitions.
set_direction
fn set_direction(self: &Self, value: PlaybackDirection)
duration
fn duration(self: &Self) -> Duration
The duration of the animation. Minimum allowed value is 1ms and maximum allowed value is 24 days.
set_duration
fn set_duration(self: &Self, value: Duration)
Sets the duration. As upstream, the range check is made on the current value rather than on the new one.
iteration_behavior
fn iteration_behavior(self: &Self) -> AnimationIterationBehavior
The iteration behavior for the key frame animation.
set_iteration_behavior
fn set_iteration_behavior(self: &Self, value: AnimationIterationBehavior)
iteration_count
fn iteration_count(self: &Self) -> i32
The number of times to repeat the key frame animation.
set_iteration_count
fn set_iteration_count(self: &Self, value: i32)
stop_behavior
fn stop_behavior(self: &Self) -> AnimationStopBehavior
Specifies how to set the property value when animation is stopped
set_stop_behavior
fn set_stop_behavior(self: &Self, value: AnimationStopBehavior)
key_frame_count
fn key_frame_count(self: &Self) -> i32
The number of key frames in the animation (WinUI KeyFrameCount).
insert_expression_key_frame
fn insert_expression_key_frame(self: &Self, normalized_progress_key: f32, value: &str, easing_function: Option<Easing>)
Inserts an expression keyframe.
normalized_progress_key is the time the key frame should occur at,
expressed as a percentage of the animation Duration. Allowed value
is from 0.0 to 1.0. value is the expression used to calculate the
value of the key frame. easing_function is the easing function to
use when interpolating between frames; the default easing of the
compositor when None.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyErasedDestructorIntoEitherDeref
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.