Skip to content

$rect

Draws a rectangle in the current path. (not filled or stroked)

Usage

$rect[canvas;x;y;width;height;...radius?]

Parameters

FieldTypeDescriptionRequired
canvasStringName of the canvas.True
xNumberThe rect start X coordinate.True
yNumberThe rect start Y coordinate.True
widthNumberThe rect width.True
heightNumberThe rect height.True
radiusNumberThe rect corners radius.False

Example(s)

No examples for this function.

meow

Raw Info

{
"name": "$rect",
"description": "Draws a rectangle in the current path. (not filled or stroked)",
"params": [
{
"name": "canvas",
"description": "Name of the canvas.",
"type": "String",
"required": true
},
{
"name": "x",
"description": "The rect start X coordinate.",
"type": "Number",
"required": true
},
{
"name": "y",
"description": "The rect start Y coordinate.",
"type": "Number",
"required": true
},
{
"name": "width",
"description": "The rect width.",
"type": "Number",
"required": true
},
{
"name": "height",
"description": "The rect height.",
"type": "Number",
"required": true
},
{
"name": "radius",
"description": "The rect corners radius.",
"type": "Number",
"required": false
}
],
"usage": "$rect[canvas;x;y;width;height;...radius?]",
"category": "canvas",
"src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/rect.ts",
"docs": "https://aoicanvas.vercel.app/functions/rect"
}