$newLinearGradient
Creates a new linear gradient.
Usage
$newLinearGradient[gradient;x1;y1;x2;y2;...stops?]Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| gradient | String | Name of the gradient. | True |
| x1 | Number | The X coordinate of the start point. | True |
| y1 | Number | The Y coordinate of the start point. | True |
| x2 | Number | The X coordinate of the end point. | True |
| y2 | Number | The Y coordinate of the end point. | True |
| stops | $addColorStop | Color stops of the gradient. | False |
Example(s)
No examples for this function.

Raw Info
{ "name": "$newLinearGradient", "description": "Creates a new linear gradient.", "params": [ { "name": "gradient", "description": "Name of the gradient.", "type": "String", "required": true }, { "name": "x1", "description": "The X coordinate of the start point.", "type": "Number", "required": true }, { "name": "y1", "description": "The Y coordinate of the start point.", "type": "Number", "required": true }, { "name": "x2", "description": "The X coordinate of the end point.", "type": "Number", "required": true }, { "name": "y2", "description": "The Y coordinate of the end point.", "type": "Number", "required": true }, { "name": "stops", "description": "Color stops of the gradient.", "type": "$addColorStop", "required": false } ], "usage": "$newLinearGradient[gradient;x1;y1;x2;y2;...stops?]", "category": "canvas", "src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/newLinearGradient.ts", "docs": "https://aoicanvas.vercel.app/functions/newlineargradient"}