Google is committed to advancing racial equity for Black communities. See how.

# PathInterpolatorCompat

`class PathInterpolatorCompat`
 kotlin.Any ↳ androidx.core.view.animation.PathInterpolatorCompat

Helper for creating path-based `Interpolator` instances. On API 21 or newer, the platform implementation will be used and on older platforms a compatible alternative implementation will be used.

## Summary

Public methods
static Interpolator!
`create(path: Path!)`

Create an `Interpolator` for an arbitrary .

static Interpolator!
`create(controlX: Float, controlY: Float)`

Create an `Interpolator` for a quadratic Bezier curve.

static Interpolator!
`create(controlX1: Float, controlY1: Float, controlX2: Float, controlY2: Float)`

Create an `Interpolator` for a cubic Bezier curve.

## Public methods

### create

`static fun create(path: Path!): Interpolator!`

Create an `Interpolator` for an arbitrary . The must begin at `(0, 0)` and end at `(1, 1)`. The x-coordinate along the 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.
Parameters
`path` Path!: the `Path` to use to make the line representing the `Interpolator`
Return
`Interpolator!` the `Interpolator` representing the `Path`

### create

`static fun create(    controlX: Float,     controlY: Float): Interpolator!`

Create an `Interpolator` for a quadratic Bezier curve. The end points `(0, 0)` and `(1, 1)` are assumed.

Parameters
`controlX` Float: the x coordinate of the quadratic Bezier control point
`controlY` Float: the y coordinate of the quadratic Bezier control point
Return
`Interpolator!` the `Interpolator` representing the quadratic Bezier curve

### create

`static fun create(    controlX1: Float,     controlY1: Float,     controlX2: Float,     controlY2: Float): Interpolator!`

Create an `Interpolator` for a cubic Bezier curve. The end points `(0, 0)` and `(1, 1)` are assumed.

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
Return
`Interpolator!` the `Interpolator` representing the cubic Bezier curve