Skip to main content
Version: 9.0.2

Storyboard Javascript Canvas API

The Storyboard canvas API provides an interface for clients to perform their own basic drawing operations into an in-memory buffer.

To access the drawing operations, a canvas render extension must be created first and given a unique name within the application. Once a canvas render extension is created, a Lua canvas object can be accessed using the sb.getCanvas call.

In this documentation, the object returned from the sb.getCanvas functions will be identified as a CANVAS object. Methods associated with the CANVAS object must be invoked using the Lua colon (:) notation, for example CANVAS:strokeRect.

The Lua canvas API is dependent on both the Lua plugin (libgre-plugin-lua) and the canvas render extension plugin (libgre-plugin-canvas).