gradient

abstract fun gradient(triangles: FloatArray, colors: Array<Color>)

A gradient fill. Each vertex of each triangle has a color.

Parameters

triangles

Each triangle is 6 floats : x1,y1, x2, y2, x4, y3

colors

Each corner of the triangle has an associated color. The length of colors must be half the length of triangles.