# PathInterpolatorCompat

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat#)  

# PathInterpolatorCompat

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
PathInterpolatorCompat
`  
`

extends Object


``


`

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

<br />

*** ** * ** ***

Helper for creating path-based[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)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](https://developer.android.com/reference/android/view/animation/Interpolator.html) | ` `[create](https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat#create(android.graphics.Path))`(`[Path](https://developer.android.com/reference/android/graphics/Path.html)` path) ` Create an[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)for an arbitrary[Path](https://developer.android.com/reference/android/graphics/Path.html). |
| ` static `[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html) | ` `[create](https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat#create(float, float, float, float))`(float controlX1, float controlY1, float controlX2, float controlY2) ` Create an[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)for a cubic Bezier curve.                                                                             |
| ` static `[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html) | ` `[create](https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat#create(float, float))`(float controlX, float controlY) ` Create an[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)for a quadratic Bezier curve.                                                                                                                           |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public methods

### create

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Interpolator create (Path path)
```

Create an[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)for an arbitrary[Path](https://developer.android.com/reference/android/graphics/Path.html). The[Path](https://developer.android.com/reference/android/graphics/Path.html)must begin at`(0, 0)`and end at`(1, 1)`. The x-coordinate along the[Path](https://developer.android.com/reference/android/graphics/Path.html)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)`.

<br />

The[Path](https://developer.android.com/reference/android/graphics/Path.html)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.

<br />

<br />

|                                                                                                                  Parameters                                                                                                                  ||
|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `path` | `Path`: the[Path](https://developer.android.com/reference/android/graphics/Path.html)to use to make the line representing the[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html) <br /> |

|                                                                                                                                                Returns                                                                                                                                                 ||
|--------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html) | the[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)representing the[Path](https://developer.android.com/reference/android/graphics/Path.html) <br /> |

### create

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

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

Create an[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)for a cubic Bezier curve. The end points`(0, 0)`and`(1, 1)`are assumed.

<br />

|                                          Parameters                                           ||
|-------------|----------------------------------------------------------------------------------|
| `controlX1` | `float`: the x coordinate of the first control point of the cubic Bezier <br />  |
| `controlY1` | `float`: the y coordinate of the first control point of the cubic Bezier <br />  |
| `controlX2` | `float`: the x coordinate of the second control point of the cubic Bezier <br /> |
| `controlY2` | `float`: the y coordinate of the second control point of the cubic Bezier <br /> |

|                                                                                                                     Returns                                                                                                                     ||
|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| [Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html) | the[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)representing the cubic Bezier curve <br /> |

### create

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Interpolator create (float controlX, 
                float controlY)
```

Create an[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)for a quadratic Bezier curve. The end points`(0, 0)`and`(1, 1)`are assumed.

<br />

|                                     Parameters                                     ||
|------------|------------------------------------------------------------------------|
| `controlX` | `float`: the x coordinate of the quadratic Bezier control point <br /> |
| `controlY` | `float`: the y coordinate of the quadratic Bezier control point <br /> |

|                                                                                                                       Returns                                                                                                                       ||
|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| [Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html) | the[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator.html)representing the quadratic Bezier curve <br /> |

-

  ## Classes

  - [FastOutLinearInInterpolator](https://developer.android.com/reference/android/support/v4/view/animation/FastOutLinearInInterpolator)
  - [FastOutSlowInInterpolator](https://developer.android.com/reference/android/support/v4/view/animation/FastOutSlowInInterpolator)
  - [LinearOutSlowInInterpolator](https://developer.android.com/reference/android/support/v4/view/animation/LinearOutSlowInInterpolator)
  - [PathInterpolatorCompat](https://developer.android.com/reference/android/support/v4/view/animation/PathInterpolatorCompat)