canvas
canvas([width=640], [height=480], [ratio], [background=#FFFFFF], [center=false])
Initialize the drawing canvas with optional dimensions, background color, and center mode
Arguments
| Name | Required | Default | Description |
|---|---|---|---|
width | - | 640 | Width of the canvas in pixels |
height | - | 480 | Height of the canvas in pixels |
ratio | - | - | Aspect ratio (calculated if width or height is missing) |
background | - | #FFFFFF | Background color (hex string) |
center | - | false | Translate coords to center |