FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ExpressionAnimation

    struct · ferroui-base · v0.5.0

    struct ExpressionAnimation
    

    A Composition Animation that uses a mathematical equation to calculate the value for an animating property every frame.

    The core of ExpressionAnimations allows a developer to define a mathematical equation that can be used to calculate the value of a targeted animating property each frame. This contrasts KeyFrameAnimations, which use an interpolator to define how the animating property changes over time. The mathematical equation can be defined using references to properties of Composition objects, mathematical functions and operators and Input. Use the start_animation method of a composition object to start the animation.

    View source

    Members

    expression

    fn expression(self: &Self) -> Option<String>
    

    The mathematical equation specifying how the animated value is calculated each frame. The Expression is the core of an ExpressionAnimation and represents the equation the system will use to calculate the value of the animation property each frame. The equation is set on this property in the form of a string. Although expressions can be defined by simple mathematical equations such as "2+2", the real power lies in creating mathematical relationships where the input values can change frame over frame.

    Source

    set_expression

    fn set_expression(self: &Self, value: Option<String>)
    

    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
    • ICompositionAnimationBase
    • ICompositionAnimation
    • AsCompositionObject

    Availability

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