LinearGradient

gradient. LinearGradient

new LinearGradient(direction, stops, matrix, units)

Constructs a LinearGradient instance
Parameters:
Name Type Argument Default Description
direction Number The direction of the gradient in degrees
stops Array An array of arrays, each sub-array in the form: `[color, percentageOffset]`
matrix Matrix <optional>
The transformation matrix for the gradient.
units String <optional>
userSpace Either "boundingBox" or "userSpace"

Methods

clone() → {LinearGradient}

Clones the instance, returning a new one
Returns:
The clone
Type
LinearGradient