Most visited

Recently visited

PathInterpolatorCompat

public final class PathInterpolatorCompat
extends Object

java.lang.Object
   ↳ android.support.v4.view.animation.PathInterpolatorCompat


帮助程序,用于创建基于路径的Interpolator实例。 在API 21或更新版本上,将使用平台实现,并在较老的平台上使用兼容的替代实现。

Summary

Public methods

static Interpolator create(Path path)

创建 Interpolator对于任意 Path 。

static Interpolator create(float controlX1, float controlY1, float controlX2, float controlY2)

为三次贝塞尔曲线创建一个 Interpolator 。

static Interpolator create(float controlX, float controlY)

为二次贝塞尔曲线创建一个 Interpolator 。

Inherited methods

From class java.lang.Object

Public methods

create

Interpolator create (Path path)

创建Interpolator对于任意Path 。 该Path必须在开始(0, 0) ,并在结束(1, 1) 。 沿着Path的x坐标是输入值,输出是该点处的线的y坐标。 这意味着路径必须符合功能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.

Parameters
path Path: the Path to use to make the line representing the Interpolator
Returns
Interpolator the Interpolator representing the Path

create

Interpolator create (float controlX1, 
                float controlY1, 
                float controlX2, 
                float controlY2)

为三次贝塞尔曲线创建一个Interpolator 。 假定端点(0, 0)和(1, 1) 。

Parameters
controlX1 float: the x coordinate of the first control point of the cubic Bezier
controlY1 float: the y coordinate of the first control point of the cubic Bezier
controlX2 float: the x coordinate of the second control point of the cubic Bezier
controlY2 float: the y coordinate of the second control point of the cubic Bezier
Returns
Interpolator the Interpolator representing the cubic Bezier curve

create

Interpolator create (float controlX, 
                float controlY)

为二次贝塞尔曲线创建一个Interpolator 。 假定端点(0, 0)和(1, 1) 。

Parameters
controlX float: the x coordinate of the quadratic Bezier control point
controlY float: the y coordinate of the quadratic Bezier control point
Returns
Interpolator the Interpolator representing the quadratic Bezier curve

Hooray!