pub struct MaterialRectArcTween { /* private fields */ }Expand description
A tween that interpolates a Rect by having its opposite corners follow
circular arcs.
This class specializes the interpolation of Tween<Rect> so that instead of
growing or shrinking linearly, opposite corners of the rectangle follow arcs
in a manner consistent with Material Design principles.
Specifically, the rectangle corners whose diagonals are closest to the overall
direction of the animation follow arcs defined with MaterialPointArcTween.
The arcs are worked out when begin and end are
both set. A tween is a plain value, held as Rc<dyn RectTweenObject> where a
hero wants one.
See also:
MaterialRectCenterArcTween, which interpolates a rect along a circular arc between the begin and endRect’s centers.Tween, for a discussion on how to use interpolation objects.MaterialPointArcTween, the analog forOffsetinterpolation.RectTween, which does a linear rectangle interpolation.Hero::create_rect_tween, which can be used to specify the tween that defines a hero’s path.
Implementations§
Source§impl MaterialRectArcTween
impl MaterialRectArcTween
Sourcepub fn begin(&self) -> Option<Rect>
pub fn begin(&self) -> Option<Rect>
The value this variable has at the beginning of the animation.
Sourcepub fn begin_arc(&self) -> Option<&MaterialPointArcTween>
pub fn begin_arc(&self) -> Option<&MaterialPointArcTween>
Sourcepub fn end_arc(&self) -> Option<&MaterialPointArcTween>
pub fn end_arc(&self) -> Option<&MaterialPointArcTween>
Trait Implementations§
Source§impl Animatable<Option<Rect>> for MaterialRectArcTween
impl Animatable<Option<Rect>> for MaterialRectArcTween
Source§fn transform(&self, app: &App, t: f64) -> Option<Rect>
fn transform(&self, app: &App, t: f64) -> Option<Rect>
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 MaterialRectArcTween
impl Clone for MaterialRectArcTween
Source§impl Debug for MaterialRectArcTween
impl Debug for MaterialRectArcTween
Source§impl RectTweenObject for MaterialRectArcTween
impl RectTweenObject for MaterialRectArcTween
Source§fn begin(&self, _app: &App) -> Option<Rect>
fn begin(&self, _app: &App) -> Option<Rect>
The value this variable has at the beginning of the animation.
Source§fn end(&self, _app: &App) -> Option<Rect>
fn end(&self, _app: &App) -> Option<Rect>
The value this variable has at the end of the animation.
Source§fn lerp(&self, _app: &App, t: f64) -> Option<Rect>
fn lerp(&self, _app: &App, t: f64) -> Option<Rect>
Returns the value this variable has at the given animation clock value.
Auto Trait Implementations§
impl Forget for MaterialRectArcTween
impl Freeze for MaterialRectArcTween
impl Move for MaterialRectArcTween
impl RefUnwindSafe for MaterialRectArcTween
impl Send for MaterialRectArcTween
impl Sync for MaterialRectArcTween
impl Unpin for MaterialRectArcTween
impl UnsafeUnpin for MaterialRectArcTween
impl UnwindSafe for MaterialRectArcTween
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