PathInterpolatorCompat
public final class PathInterpolatorCompat
extends Object
帮助程序,用于创建基于路径的Interpolator实例。 在API 21或更新版本上,将使用平台实现,并在较老的平台上使用兼容的替代实现。
摘要(Summary)
公共方法(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 |
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 |
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 |