pub struct MaterialRectCenterArcTween { /* private fields */ }Expand description
A tween that interpolates a Rect by moving it along a circular arc from
begin’s Rect::center to end’s
Rect::center while interpolating the rectangle’s width and height.
The arc that defines that center of the interpolated rectangle as it morphs
from begin to end is a MaterialPointArcTween.
See also:
MaterialRectArcTween, A tween that interpolates aRectby having its opposite corners follow circular arcs.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 MaterialRectCenterArcTween
impl MaterialRectCenterArcTween
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 center_arc(&self) -> Option<&MaterialPointArcTween>
pub fn center_arc(&self) -> Option<&MaterialPointArcTween>
If begin and end are non-null, returns a
tween that interpolates along a circular arc between
begin’s Rect::center and end’s
Rect::center.
Trait Implementations§
Source§impl Animatable<Option<Rect>> for MaterialRectCenterArcTween
impl Animatable<Option<Rect>> for MaterialRectCenterArcTween
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 MaterialRectCenterArcTween
impl Clone for MaterialRectCenterArcTween
Source§impl Debug for MaterialRectCenterArcTween
impl Debug for MaterialRectCenterArcTween
Source§impl RectTweenObject for MaterialRectCenterArcTween
impl RectTweenObject for MaterialRectCenterArcTween
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 MaterialRectCenterArcTween
impl Freeze for MaterialRectCenterArcTween
impl Move for MaterialRectCenterArcTween
impl RefUnwindSafe for MaterialRectCenterArcTween
impl Send for MaterialRectCenterArcTween
impl Sync for MaterialRectCenterArcTween
impl Unpin for MaterialRectCenterArcTween
impl UnsafeUnpin for MaterialRectCenterArcTween
impl UnwindSafe for MaterialRectCenterArcTween
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