FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CrossFade

    struct · ferroui-base · v0.5.0

    struct CrossFade
    

    Defines a cross-fade animation between two visuals.

    View source

    Members

    new

    fn new() -> Self
    

    Creates a cross-fade with a zero duration.

    Source

    with_duration

    fn with_duration(duration: SignedDuration) -> Self
    

    Creates a cross-fade with the given duration.

    Source

    duration

    fn duration(self: &Self) -> SignedDuration
    

    The duration of the animation.

    Source

    set_duration

    fn set_duration(self: &Self, value: SignedDuration)
    

    Source

    fade_in_easing

    fn fade_in_easing(self: &Self) -> Easing
    

    The easing function used to fade in.

    Source

    set_fade_in_easing

    fn set_fade_in_easing(self: &Self, value: impl Into<Easing>)
    

    Source

    fade_out_easing

    fn fade_out_easing(self: &Self) -> Easing
    

    The easing function used to fade out.

    Source

    set_fade_out_easing

    fn set_fade_out_easing(self: &Self, value: impl Into<Easing>)
    

    Source

    fill_mode

    fn fill_mode(self: &Self) -> FillMode
    

    The fill mode.

    Source

    set_fill_mode

    fn set_fill_mode(self: &Self, value: FillMode)
    

    Source

    start_cross_fade

    fn start_cross_fade(self: &Self, from: Option<&Ref<Visual>>, to: Option<&Ref<Visual>>, cancellation_token: CancellationToken) -> JoinHandle<()>
    

    Starts the animation: fades from out and to in. When it has ended without being cancelled, from is hidden.

    Source

    Trait implementations

    Availability

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