$scale
Adds a scaling transformation to the canvas units horizontally and/or vertically.
Usage
$scale[canvas;x;y]Parameters
| Field | Type | Description | Required |
|---|---|---|---|
| canvas | String | Name of the canvas. | True |
| x | Number | Scaling factor in the horizontal direction. A value of 1 results in no horizontal scaling. | True |
| y | Number | Scaling factor in the vertical direction. A value of 1 results in no vertical scaling. | True |
Example(s)
No examples for this function.

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"}