$attachCanvas
Attaches the canvas.
Usage
$attachCanvas[canvas;name?]Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| canvas | String | The name of the canvas to attach. | True |
| name | String | The canvas attachment file name. | False |
Example(s)
$attachCanvas[mycanvas;house.png]
$stroke[mycanvas;#03a9f4;10]
$closePath[mycanvas]$lineTo[mycanvas;250;140]$lineTo[mycanvas;150;60]$moveTo[mycanvas;50;140]$beginPath[mycanvas]
$fillRect[mycanvas;#03a9f4;130;190;40;60]$strokeRect[mycanvas;#03a9f4;75;140;150;110;10]
$createCanvas[mycanvas;300;320]
Raw Info
{ "name": "$attachCanvas", "description": "Attaches the canvas.", "params": [ { "name": "canvas", "description": "The name of the canvas to attach.", "type": "String", "required": true }, { "name": "name", "description": "The canvas attachment file name.", "type": "String", "required": false } ], "usage": "$attachCanvas[canvas;name?]", "example": "```aoi\n$attachCanvas[mycanvas;house.png]\n\n$stroke[mycanvas;#03a9f4;10]\n\n$closePath[mycanvas]\n$lineTo[mycanvas;250;140]\n$lineTo[mycanvas;150;60]\n$moveTo[mycanvas;50;140]\n$beginPath[mycanvas]\n\n$fillRect[mycanvas;#03a9f4;130;190;40;60]\n$strokeRect[mycanvas;#03a9f4;75;140;150;110;10]\n\n$createCanvas[mycanvas;300;320]\n```\n\n", "category": "canvas", "src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/attachCanvas.ts", "docs": "https://aoicanvas.vercel.app/functions/attachcanvas"}