Paint~ LinearGradient

A linear gradient

Constructor

new LinearGradient(angle)

Creates a new linear gradient
Parameters:
NameTypeDescription
anglenumberThe angle direction of the gradient (Radians)
Example
// Create a new gradient that goes from red to blue
let gradient = new LinearGradient(0 /* The angle of the gradient in radians *\/);
gradient.addColorStop(0, Color.Red);
gradient.addColorStop(1, Color.Blue);

Extends

  • Gradient

Methods

getColorAt(fillStart, point, fillEnd) → {Color}

Gets the color for a point in the gradient
Parameters:
NameTypeDescription
fillStartPointThe start point of the fill
pointPointThe point to get the color for
fillEndPointThe end point of the fill
Returns:
Type: 
Color