FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    delay_behavior

    fn delay_behavior(self: &Self) -> AnimationDelayBehavior
    

    The delay behavior of the key frame animation.

    Source

    set_delay_behavior

    fn set_delay_behavior(self: &Self, value: AnimationDelayBehavior)
    

    Source

    delay_time

    fn delay_time(self: &Self) -> Duration
    

    Delay before the animation starts after start_animation is called.

    Source

    set_delay_time

    fn set_delay_time(self: &Self, value: Duration)
    

    Source

    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.

    Source

    set_direction

    fn set_direction(self: &Self, value: PlaybackDirection)
    

    Source

    duration

    fn duration(self: &Self) -> Duration
    

    The duration of the animation. Minimum allowed value is 1ms and maximum allowed value is 24 days.

    Source

    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.

    Source

    iteration_behavior

    fn iteration_behavior(self: &Self) -> AnimationIterationBehavior
    

    The iteration behavior for the key frame animation.

    Source

    set_iteration_behavior

    fn set_iteration_behavior(self: &Self, value: AnimationIterationBehavior)
    

    Source

    iteration_count

    fn iteration_count(self: &Self) -> i32
    

    The number of times to repeat the key frame animation.

    Source

    set_iteration_count

    fn set_iteration_count(self: &Self, value: i32)
    

    Source

    stop_behavior

    fn stop_behavior(self: &Self) -> AnimationStopBehavior
    

    Specifies how to set the property value when animation is stopped

    Source

    set_stop_behavior

    fn set_stop_behavior(self: &Self, value: AnimationStopBehavior)
    

    Source

    key_frame_count

    fn key_frame_count(self: &Self) -> i32
    

    The number of key frames in the animation (WinUI KeyFrameCount).

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Receiver
    • Any
    • ErasedDestructor
    • IntoEither
    • Deref

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.