Skip to content

$scale

Adds a scaling transformation to the canvas units horizontally and/or vertically.

Usage

$scale[canvas;x;y]

Parameters

FieldTypeDescriptionRequired
canvasStringName of the canvas.True
xNumberScaling factor in the horizontal direction. A value of 1 results in no horizontal scaling.True
yNumberScaling factor in the vertical direction. A value of 1 results in no vertical scaling.True

Example(s)

No examples for this function.

meow

Raw Info

{
"name": "$scale",
"description": "Adds a scaling transformation to the canvas units horizontally and/or vertically.",
"params": [
{
"name": "canvas",
"description": "Name of the canvas.",
"type": "String",
"required": true
},
{
"name": "x",
"description": "Scaling factor in the horizontal direction. A value of 1 results in no horizontal scaling.",
"type": "Number",
"required": true
},
{
"name": "y",
"description": "Scaling factor in the vertical direction. A value of 1 results in no vertical scaling.",
"type": "Number",
"required": true
}
],
"usage": "$scale[canvas;x;y]",
"category": "canvas",
"src": "https://github.com/devlordduck/aoi.canvas/tree/v2/src/functions/canvas/scale.ts",
"docs": "https://aoicanvas.vercel.app/functions/scale"
}