Canvas.create()

<static> create(parent, width, height, id, skipPool) → {HTMLCanvasElement}

Creates a canvas DOM element. The element is not automatically added to the document.

Parameters
Name Type Argument Default Description
parent object

The object that will own the canvas that is created.

width number <optional>
256

The width of the canvas element.

height number <optional>
256

The height of the canvas element..

id string <optional>
(none)

If specified, and not the empty string, this will be set as the ID of the canvas element. Otherwise no ID will be set.

skipPool boolean <optional>
false

If true the canvas will not be placed in the CanvasPool global.

Returns
HTMLCanvasElement -

The newly created canvas element.

Source code: utils/Canvas.js (Line 16)
doc_phaser
2017-02-14 10:41:01
Comments
Leave a Comment

Please login to continue.