Skip to content

$drawImage

Draw an image.

Usage

$drawImage[canvas;src;x;y;width;height;radius?]

Parameters

FieldDescriptionTypeRequired
canvasThe canvas name.stringtrue
srcThe image src.stringtrue
xThe image X position.numbertrue
yThe image Y position.numbertrue
widthThe image width.numbertrue
heightThe image height.numbertrue
radiusThe image corners radius.number | number[]false

Example(s)

This will create a canvas with your avatar.

$attachCanvas[avatar]
$drawImage[avatar;$nonEscape[$authorAvatar];0;0;1024;1024]
$createCanvas[avatar;1024;1024]

Preview