EasingFunction.CubicBezier


public final class EasingFunction.CubicBezier extends EasingFunction


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

Creates a new CubicBezier easing function.

Public methods

boolean
equals(Object other)
final @NonNull ImmutableVec

The first control point.

final @NonNull ImmutableVec

The second control point.

int
@NonNull String

Inherited methods

From androidx.ink.brush.behavior.EasingFunction
final @NonNull Version

Returns the minimum required Version for this EasingFunction.

Public constructors

CubicBezier

Added in 1.1.0-alpha08
public CubicBezier(@NonNull Vec p1, @NonNull Vec p2)

Creates a new CubicBezier easing function.

Parameters
@NonNull Vec p1

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

@NonNull Vec p2

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

Public methods

equals

public boolean equals(Object other)

getP1

Added in 1.1.0-alpha08
public final @NonNull ImmutableVec getP1()

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

getP2

Added in 1.1.0-alpha08
public final @NonNull ImmutableVec getP2()

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

hashCode

public int hashCode()

toString

public @NonNull String toString()