AnimatedZoomJob class

Animates the zoom of a chart from the absolute scale (xOrigin, yOrigin) to (xValue, yValue) while moving the viewport so that the centered value point travels from (zoomOriginX, zoomOriginY) to (zoomCenterX, zoomCenterY). Recalculates the chart offsets when the animation ends. Used instances are not returned to the pool.

Inheritance

Constructors

AnimatedZoomJob(ViewPortHandler? viewPortHandler, ChartInvalidator? view, Transformer? transformer, YAxis? yAxis, double xAxisRange, double scaleX, double scaleY, double xOrigin, double yOrigin, double zoomCenterX, double zoomCenterY, double zoomOriginX, double zoomOriginY, int duration)
Creates a job; use getInstance to take one from the pool instead.

Properties

animator → AnimationController?
The animation running phase from 0 to 1, or null while the job is not animating. Kotlin's animator, a ValueAnimator the job creates up front; here run creates it from the host's vsync.
no setterinherited
currentOwnerId ↔ int
The ObjectPool.poolId of the pool that stores this instance, or NO_OWNER. Kotlin internal: maintained by ObjectPool; do not change it.
getter/setter pairinherited
duration ↔ int
Length of the animation in milliseconds, Kotlin's animator.duration.
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
phase ↔ double
Progress of the animation, 0 at the origin and 1 at the target.
getter/setter pairinherited
pts → Float32List
Buffer for the target point, filled in value space and converted to pixels in place.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transformer ↔ Transformer?
Converts xValue and yValue to pixels.
getter/setter pairinherited
view ↔ ChartInvalidator?
The chart to refresh.
getter/setter pairinherited
viewPortHandler ↔ ViewPortHandler?
Viewport of the chart to change.
getter/setter pairinherited
xAxisRange ↔ double
Full range of the x axis in value units.
getter/setter pair
xOrigin ↔ double
x value the animation starts from.
getter/setter pairinherited
xValue ↔ double
Target x value of the job.
getter/setter pairinherited
yAxis ↔ YAxis?
The y axis whose range decides how many y values fit into the view at a given scale.
getter/setter pair
yOrigin ↔ double
y value the animation starts from.
getter/setter pairinherited
yValue ↔ double
Target y value of the job.
getter/setter pairinherited
zoomCenterX ↔ double
x value in the center of the content rectangle when the animation ends.
getter/setter pair
zoomCenterY ↔ double
y value in the center of the content rectangle when the animation ends.
getter/setter pair
zoomOriginX ↔ double
x value in the center of the content rectangle when the animation starts.
getter/setter pair
zoomOriginY ↔ double
y value in the center of the content rectangle when the animation starts.
getter/setter pair

Methods

instantiate() → Poolable
Creates a new, blank instance of the same type.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAnimationCancel() → void
Called when the animation is cancelled; recycles the job.
override
onAnimationEnd() → void
Recalculates the offsets of the chart and redraws it. Unlike the base class, the job is not recycled.
override
onAnimationRepeat() → void
Called when the animation repeats; it never does.
override
onAnimationStart() → void
Called when the animation starts.
override
onAnimationUpdate() → void
Called on every animation frame after phase was updated. Subclasses apply the interpolated position here.
override
recycleSelf() → void
Returns this job to its pool. Called when the animation ends or is cancelled.
override
resetAnimator() → void
Prepares a pooled instance for reuse: stops an animation that is still running, without reporting its end.
inherited
run() → void
Starts the animation. Running the job again while it animates starts it over, like ValueAnimator.start().
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

getInstance(ViewPortHandler viewPortHandler, ChartInvalidator view, Transformer transformer, YAxis axis, double xAxisRange, double scaleX, double scaleY, double xOrigin, double yOrigin, double zoomCenterX, double zoomCenterY, double zoomOriginX, double zoomOriginY, int duration) → AnimatedZoomJob
Returns a pooled job set up to animate the zoom of view.