pub struct BorderRadiusTween {
pub begin: Option<BorderRadius>,
pub end: Option<BorderRadius>,
}Expand description
An interpolation between two BorderRadiuss.
This class specializes the interpolation of Tween<Option<BorderRadius>> to use
BorderRadius::lerp.
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<BorderRadius>The value this variable has at the beginning of the animation.
end: Option<BorderRadius>The value this variable has at the end of the animation.
Implementations§
Source§impl BorderRadiusTween
impl BorderRadiusTween
Sourcepub fn new(
begin: Option<BorderRadius>,
end: Option<BorderRadius>,
) -> BorderRadiusTween
pub fn new( begin: Option<BorderRadius>, end: Option<BorderRadius>, ) -> BorderRadiusTween
Creates a BorderRadius tween.
The begin and end properties may be None; the None
value is treated as a right angle (no radius).
Sourcepub fn lerp(&self, t: f64) -> Option<BorderRadius>
pub fn lerp(&self, t: f64) -> Option<BorderRadius>
Returns the value this variable has at the given animation clock value.
Trait Implementations§
Source§impl Animatable<Option<BorderRadius>> for BorderRadiusTween
impl Animatable<Option<BorderRadius>> for BorderRadiusTween
Source§fn transform(&self, _app: &App, t: f64) -> Option<BorderRadius>
fn transform(&self, _app: &App, t: f64) -> Option<BorderRadius>
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 BorderRadiusTween
impl Clone for BorderRadiusTween
Source§impl Debug for BorderRadiusTween
impl Debug for BorderRadiusTween
Source§impl TweenSlot for BorderRadiusTween
impl TweenSlot for BorderRadiusTween
Source§type Value = Option<BorderRadius>
type Value = Option<BorderRadius>
The
T of Dart’s Tween<T>.Source§fn begin(&self, _app: &App) -> Option<Option<BorderRadius>>
fn begin(&self, _app: &App) -> Option<Option<BorderRadius>>
The value this variable has at the beginning of the animation.
Source§fn set_begin(&mut self, _app: &mut App, begin: Option<Option<BorderRadius>>)
fn set_begin(&mut self, _app: &mut App, begin: Option<Option<BorderRadius>>)
Dart’s
begin setter.Auto Trait Implementations§
impl Forget for BorderRadiusTween
impl Freeze for BorderRadiusTween
impl Move for BorderRadiusTween
impl RefUnwindSafe for BorderRadiusTween
impl Send for BorderRadiusTween
impl Sync for BorderRadiusTween
impl Unpin for BorderRadiusTween
impl UnsafeUnpin for BorderRadiusTween
impl UnwindSafe for BorderRadiusTween
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