interpolateZoom function Zoom interpolation
ZoomInterpolator
interpolateZoom(
- View a,
- View b
Returns an interpolator between the two views a and b of a
two-dimensional plane, based on
“Smooth and efficient zooming and panning”
by Jarke J. van Wijk and Wim A.A. Nuij.
Each view is defined as an record of three numbers: cx, cy and width. The first two coordinates cx, cy represent the center of the viewport; the last coordinate width represents the size of the viewport.
The returned interpolator exposes a ZoomInterpolator.duration property
which encodes the recommended transition duration in milliseconds. This
duration is based on the path length of the curved trajectory through
x,y space. If you want a slower or faster transition, multiply this by
an arbitrary scale factor (V as described in the original paper).
Implementation
ZoomInterpolator interpolateZoom(View a, View b) => _interpolateZoom(a, b);