CubicKt

Added in 1.0.0-alpha05

public final class CubicKt


Summary

Public methods

static final @NonNull Cubic
Cubic(
    float anchor0X,
    float anchor0Y,
    float control0X,
    float control0Y,
    float control1X,
    float control1Y,
    float anchor1X,
    float anchor1Y
)

Create a Cubic that holds the anchor and control point data for a single Bézier curve, with anchor points (anchor0X, anchor0Y) and (anchor1X, anchor1Y) at either end and control points (control0X, control0Y) and (control1X, control1Y) determining the slope of the curve between the anchor points.

Public methods

public static final @NonNull Cubic Cubic(
    float anchor0X,
    float anchor0Y,
    float control0X,
    float control0Y,
    float control1X,
    float control1Y,
    float anchor1X,
    float anchor1Y
)

Create a Cubic that holds the anchor and control point data for a single Bézier curve, with anchor points (anchor0X, anchor0Y) and (anchor1X, anchor1Y) at either end and control points (control0X, control0Y) and (control1X, control1Y) determining the slope of the curve between the anchor points.

The returned instance is immutable.

Parameters
float anchor0X

the first anchor point x coordinate

float anchor0Y

the first anchor point y coordinate

float control0X

the first control point x coordinate

float control0Y

the first control point y coordinate

float control1X

the second control point x coordinate

float control1Y

the second control point y coordinate

float anchor1X

the second anchor point x coordinate

float anchor1Y

the second anchor point y coordinate