pub struct TextStyleTween {
pub begin: Option<TextStyle>,
pub end: Option<TextStyle>,
}Expand description
An interpolation between two TextStyles.
This class specializes the interpolation of Tween<TextStyle> to use
TextStyle::lerp.
This will not work well if the styles don’t set the same fields.
See Tween for a discussion on how to use interpolation objects.
Like EdgeInsetsTween, this one is a value rather than an arena object (see PORTING.md).
Fields§
§begin: Option<TextStyle>The value this variable has at the beginning of the animation.
end: Option<TextStyle>The value this variable has at the end of the animation.
Implementations§
Trait Implementations§
Source§impl Animatable<TextStyle> for TextStyleTween
impl Animatable<TextStyle> for TextStyleTween
Source§fn transform(&self, _app: &App, t: f64) -> TextStyle
fn transform(&self, _app: &App, t: f64) -> TextStyle
Returns the value of the object at point
t. Read moreSource§fn evaluate(&self, app: &App, animation: AnyAnimation<f64>) -> Twhere
Self: Sized,
fn evaluate(&self, app: &App, animation: AnyAnimation<f64>) -> Twhere
Self: Sized,
The current value of this object for the given animation. Read more
Source§fn animate(
self,
app: &mut App,
parent: Retained<AnyAnimation<f64>>,
) -> Retained<AnyAnimation<T>>
fn animate( self, app: &mut App, parent: Retained<AnyAnimation<f64>>, ) -> Retained<AnyAnimation<T>>
Returns a new animation that is driven by the given animation but
that takes on values determined by this object. The new animation keeps
parent; whoever keeps the result keeps both.Source§fn chain<P>(self, parent: P) -> ChainedEvaluation<P, Self>
fn chain<P>(self, parent: P) -> ChainedEvaluation<P, Self>
Returns a new
Animatable whose value is determined by first
evaluating the given parent and then evaluating this object at the
result.Source§impl Clone for TextStyleTween
impl Clone for TextStyleTween
Source§impl Debug for TextStyleTween
impl Debug for TextStyleTween
Auto Trait Implementations§
impl !RefUnwindSafe for TextStyleTween
impl !Send for TextStyleTween
impl !Sync for TextStyleTween
impl !UnwindSafe for TextStyleTween
impl Forget for TextStyleTween
impl Freeze for TextStyleTweenwhere
&'static dyn ColorExtension: Freeze,
*const RcInner<dyn ColorExtension> is !null: Freeze,
PhantomData<RcInner<dyn ColorExtension>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
*const RcInner<Paint> is !null: Freeze,
PhantomData<RcInner<Paint>>: Freeze,
PhantomData<Shadow>: Freeze,
PhantomData<FontFeature>: Freeze,
PhantomData<FontVariation>: Freeze,
impl Move for TextStyleTween
impl Unpin for TextStyleTween
impl UnsafeUnpin for TextStyleTweenwhere
&'static dyn ColorExtension: UnsafeUnpin,
*const RcInner<dyn ColorExtension> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn ColorExtension>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const RcInner<Paint> is !null: UnsafeUnpin,
PhantomData<RcInner<Paint>>: UnsafeUnpin,
PhantomData<Shadow>: UnsafeUnpin,
PhantomData<FontFeature>: UnsafeUnpin,
PhantomData<FontVariation>: UnsafeUnpin,
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