pub struct KeyFade { /* private fields */ }๐Deprecated:
ms/wall-clock animation is superseded by tick-driven core::anim; see LPAR-06
Expand description
Multi-keyframe alpha animation with per-segment easing and looping.
A KeyFade with two keyframes is equivalent to a FadeTransition.
With more keyframes you can create complex fade sequences such as
pulse, flash, or staged reveal effects.
Implementationsยง
Sourceยงimpl KeyFade
impl KeyFade
Sourcepub fn key(self, time_ms: u32, alpha: u8, easing: Easing) -> Self
pub fn key(self, time_ms: u32, alpha: u8, easing: Easing) -> Self
Add a keyframe (builder pattern, chainable).
time_ms is the absolute time from the animation start. easing is
the curve applied from this keyframe to the next one (ignored on the
last keyframe).
Keyframes must be added in ascending time_ms order.
Auto Trait Implementationsยง
impl !Send for KeyFade
impl !Sync for KeyFade
impl Freeze for KeyFade
impl RefUnwindSafe for KeyFade
impl Unpin for KeyFade
impl UnsafeUnpin for KeyFade
impl UnwindSafe for KeyFade
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> CheckedAs for T
impl<T> CheckedAs for T
Sourceยงfn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Sourceยงimpl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Sourceยงfn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Sourceยงimpl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Sourceยงfn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Sourceยงimpl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Sourceยงfn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Sourceยงimpl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Sourceยงfn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Sourceยงimpl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Sourceยงfn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Sourceยงimpl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Sourceยงfn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Sourceยงimpl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Sourceยงfn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Sourceยงimpl<T> WrappingAs for T
impl<T> WrappingAs for T
Sourceยงfn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Sourceยงimpl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Sourceยงfn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.