EasingFunction.CubicBezier



Parameters for a custom cubic Bezier easing function.

A cubic Bezier is generally defined by four points, from P0 to P3. In the case of the easing function, P0 is defined to be the point (0, 0), and P3 is defined to be the point (1, 1). The x-values of p1 and p2 are required to be in the range 0, 1. This guarantees that the resulting curve is a function with respect to x and follows the CSS specification

Valid parameters must have all finite values, and p1.x and p2.x must be in the interval 0, 1.

Input x values that are outside the interval 0, 1 will be clamped, but output values will not. This is somewhat different from the w3c defined cubic Bezier that allows extrapolated values outside x in 0, 1 by following end-point tangents.

Summary

Public constructors

CubicBezier(p1: Vec, p2: Vec)

Creates a new CubicBezier easing function.

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

ImmutableVec

The first control point.

Cmn
ImmutableVec

The second control point.

Cmn

Inherited functions

From androidx.ink.brush.behavior.EasingFunction
Version

Returns the minimum required Version for this EasingFunction.

Cmn

Public constructors

CubicBezier

CubicBezier(p1: Vec, p2: Vec)

Creates a new CubicBezier easing function.

Parameters
p1: Vec

The first control point. Its x-coordinate must be in the range 0, 1.

p2: Vec

The second control point. Its x-coordinate must be in the range 0, 1.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

p1

val p1ImmutableVec

The first control point. Its x-coordinate must be in the range 0, 1.

p2

val p2ImmutableVec

The second control point. Its x-coordinate must be in the range 0, 1.