Skip to content

$setLineDash

Sets the line dash pattern used when stroking lines. It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.

Usage

$setLineDash[canvas;...segments?]

Parameters

FieldTypeDescriptionRequired
canvasStringName of the canvas to set the line dash in.True
segmentsNumberAn array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).False

Example(s)

No examples for this function.

meow

Raw Info

{
"name": "$setLineDash",
"description": "Sets the line dash pattern used when stroking lines. It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.",
"params": [
{
"name": "canvas",
"description": "Name of the canvas to set the line dash in.",
"type": "String",
"required": true
},
{
"name": "segments",
"description": "An array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).",
"type": "Number",
"required": false
}
],
"usage": "$setLineDash[canvas;...segments?]",
"category": "canvas",
"src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/setLineDash.ts",
"docs": "https://aoicanvas.vercel.app/functions/setlinedash"
}