Skip to main content
Version: 9.0.2

canvas.fill

canvas.fill(color)

Flood fill the entire canvas with a specific color.

Parameters

ParameterTypeDescription
colornumberAn RGB color value as an integer value.

Example

//Flood fill the canvas with a red background value
function fillWithRed(name){
var canvas = sb.getCanvas(name);
canvas.fill(0xff0000);
}