Skip to content

$attachCanvas

Attaches canvas.

Usage

$attachCanvas[canvas;name?]

Parameters

FieldDescriptionTypeRequired
canvasThe canvas name.stringtrue
nameThe attachment name. (format included, for example .png)stringfalse

Example(s)

This will create new 300x320 canvas with house and add an attachment house.png.

$attachCanvas[mycanvas;house.png]
$drawLines[mycanvas;draw;#03a9f4;10;50;140;150:60;250:140]
$fillRect[mycanvas;#03a9f4;130;190;40;60]
$strokeRect[mycanvas;#03a9f4;75;140;150;110]
$createCanvas[mycanvas;300;320]

Preview

This will create new 300x320 canvas with house and add an attachment with name of your canvas. (mycanvas.png)

$attachCanvas[mycanvas]
$drawLines[mycanvas;draw;#03a9f4;10;50;140;150:60;250:140]
$fillRect[mycanvas;#03a9f4;130;190;40;60]
$strokeRect[mycanvas;#03a9f4;75;140;150;110]
$createCanvas[mycanvas;300;320]

Preview