Canvas
// width - the width of the canvas, in pixels
// height - the height of the canvas, in pixels
// background - the background color of the canvas (ex. #fff)
canvas myCanvas @= canvas(width, height, background)
// url - a DataURI to load as the canvas content, stretched to fit
canvas myCanvas @= canvas.fromURL(url, width, height)Canvas Type
canvas myCanvas @= canvas(100, 100, "#fff")
// will log true
log typeof(myCanvas) == "canvas"Writing to the Canvas
Shapes
Stamping
Reading the Canvas
Managing Canvases
Deleting/Clearing Canvases
Resizing Canvases
Example: Drawing a Checker Pattern
Last updated