Skip to main content
Version: 9.0.2

sb.getCanvas

sb.getCanvas(name)

Get a canvas object handle by name. The canvas object has the following properties that can be accessed:

width Returns an integer that is the width of the canvas. This is a read only property.

height Returns an integer that is the height of the canvas. This is a read only property.

globalAlpha This property can be used to get or set the global alpha for drawing operations in the canvas.

lineWidth This property can be used to get or set the line width for line drawing operations in the canvas.

Parameters

ParameterTypeDescription
namestringThe name of the canvas to get.

Returns

TypeDescription
objectA canvas object that represents the canvas or null if no canvas can be found.