pub struct MaterialPointArcTween { /* private fields */ }Expand description
A tween that interpolates an Offset along a circular arc.
This class specializes the interpolation of Tween<Offset> so that instead
of a straight line, the intermediate points follow the arc of a circle in a
manner consistent with Material Design principles.
The arc’s radius is related to the bounding box that contains the
begin and end points. If the bounding box is
taller than it is wide, then the center of the circle will be horizontally
aligned with the end point. Otherwise the center of the circle will be aligned
with the begin point. The arc’s sweep is always less than or equal to 90
degrees.
The arc is worked out when begin and end are
both set, so the geometry getters and lerp read it. A tween
is a plain value: Animatable::animate takes a copy, so a later
set_begin is not seen by an animation already driven.
See also:
Tween, for a discussion on how to use interpolation objects.MaterialRectArcTween, which extends this concept to interpolatingRects.
Implementations§
Source§impl MaterialPointArcTween
impl MaterialPointArcTween
Sourcepub fn begin(&self) -> Option<Offset>
pub fn begin(&self) -> Option<Offset>
The value this variable has at the beginning of the animation.
Sourcepub fn begin_angle(&self) -> Option<f64>
pub fn begin_angle(&self) -> Option<f64>
Trait Implementations§
Source§impl Animatable<Offset> for MaterialPointArcTween
impl Animatable<Offset> for MaterialPointArcTween
Source§fn transform(&self, _app: &App, t: f64) -> Offset
fn transform(&self, _app: &App, t: f64) -> Offset
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,
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>>
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>
Animatable whose value is determined by first
evaluating the given parent and then evaluating this object at the
result.