public final class PathInterpolatorCompat
extends java.lang.Object
Interpolator instances. On API 21 or newer, the
platform implementation will be used and on older platforms a compatible alternative
implementation will be used.| 限定符和类型 | 方法和说明 |
|---|---|
static android.view.animation.Interpolator |
create(float controlX,
float controlY)
Create an
Interpolator for a quadratic Bezier curve. |
static android.view.animation.Interpolator |
create(float controlX1,
float controlY1,
float controlX2,
float controlY2)
Create an
Interpolator for a cubic Bezier curve. |
static android.view.animation.Interpolator |
create(android.graphics.Path path)
Create an
Interpolator for an arbitrary Path. |
public static android.view.animation.Interpolator create(android.graphics.Path path)
Interpolator for an arbitrary Path. The Path
must begin at (0, 0) and end at (1, 1). The x-coordinate along the
Path is the input value and the output is the y coordinate of the line at that
point. This means that the Path must conform to a function y = f(x).
The Path must not have gaps in the x direction and must not
loop back on itself such that there can be two points sharing the same x coordinate.path - the Path to use to make the line representing the InterpolatorInterpolator representing the Pathpublic static android.view.animation.Interpolator create(float controlX,
float controlY)
Interpolator for a quadratic Bezier curve. The end points
(0, 0) and (1, 1) are assumed.controlX - the x coordinate of the quadratic Bezier control pointcontrolY - the y coordinate of the quadratic Bezier control pointInterpolator representing the quadratic Bezier curvepublic static android.view.animation.Interpolator create(float controlX1,
float controlY1,
float controlX2,
float controlY2)
Interpolator for a cubic Bezier curve. The end points
(0, 0) and (1, 1) are assumed.controlX1 - the x coordinate of the first control point of the cubic BeziercontrolY1 - the y coordinate of the first control point of the cubic BeziercontrolX2 - the x coordinate of the second control point of the cubic BeziercontrolY2 - the y coordinate of the second control point of the cubic BezierInterpolator representing the cubic Bezier curve