makeLinearGradient

fun makeLinearGradient(p0: Point, p1: Point, gradient: Gradient, localMatrix: Matrix33? = null): Shader

Returns a shader that generates a linear gradient between the two specified points. If the inputs are invalid, this will return nullptr.

Parameters

points

Array of 2 points, the end-points of the line segment

gradient

Description of the colors and interpolation method

localMatrix

Optional local matrix, may be null


fun makeLinearGradient(x0: Float, y0: Float, x1: Float, y1: Float, gradient: Gradient, localMatrix: Matrix33? = null): Shader