Constructor
new LinearGradient(angle)
Creates a new linear gradient
Parameters:
Name | Type | Description |
---|---|---|
angle | number | The 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:
Name | Type | Description |
---|---|---|
fillStart | Point | The start point of the fill |
point | Point | The point to get the color for |
fillEnd | Point | The end point of the fill |
Returns:
- Type:
- Color