Description

Sets the color and opacity of the background

Usage

Parameters

  • color {String}

    Background color in hexadecimal

  • padding {Integer} optional

    (optional) Inner margin below border (0 by default)

  • opacity {Integer} optional

    (optional) Opacity (1 by default)

Returns

CanvasEngine.Window

Example

In ready method

var _window = canvas.Window.new(this, 230, 200, "border");

_window.setBackground("#ff0000", 10, .5);

_window.open(stage);

Discussion