Skip to content

$newLinearGradient

Creates a new linear gradient.

Usage

$newLinearGradient[gradient;x1;y1;x2;y2;...stops?]

Parameters

FieldTypeDescriptionRequired
gradientStringName of the gradient.True
x1NumberThe X coordinate of the start point.True
y1NumberThe Y coordinate of the start point.True
x2NumberThe X coordinate of the end point.True
y2NumberThe Y coordinate of the end point.True
stops$addColorStopColor stops of the gradient.False

Example(s)

No examples for this function.

meow

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"
}