CrossFade
struct · ferroui-base · v0.5.0
struct CrossFade
Defines a cross-fade animation between two visuals.
Members
newwith_durationdurationset_durationfade_in_easingset_fade_in_easingfade_out_easingset_fade_out_easingfill_modeset_fill_modestart_cross_fade
new
fn new() -> Self
Creates a cross-fade with a zero duration.
with_duration
fn with_duration(duration: SignedDuration) -> Self
Creates a cross-fade with the given duration.
duration
fn duration(self: &Self) -> SignedDuration
The duration of the animation.
set_duration
fn set_duration(self: &Self, value: SignedDuration)
fade_in_easing
fn fade_in_easing(self: &Self) -> Easing
The easing function used to fade in.
set_fade_in_easing
fn set_fade_in_easing(self: &Self, value: impl Into<Easing>)
fade_out_easing
fn fade_out_easing(self: &Self) -> Easing
The easing function used to fade out.
set_fade_out_easing
fn set_fade_out_easing(self: &Self, value: impl Into<Easing>)
fill_mode
fn fill_mode(self: &Self) -> FillMode
The fill mode.
set_fill_mode
fn set_fill_mode(self: &Self, value: FillMode)
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAnyValueClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDefaultIPageTransitionIProgressPageTransitionPartialEqMarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.