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
| Parameter | Type | Description |
|---|---|---|
name | string | The name of the canvas to get. |
Returns
| Type | Description |
|---|---|
object | A canvas object that represents the canvas or null if no canvas can be found. |