Class: CanvasBuffer

CanvasBuffer

Creates a Canvas element of the given size.


new CanvasBuffer(width, height)

Parameters:
Name Type Description
width number

the width for the newly created canvas

height number

the height for the newly created canvas

Source:

Members


canvas :HTMLCanvasElement

The Canvas object that belongs to this CanvasBuffer.

Type:
  • HTMLCanvasElement
Source:

context :CanvasRenderingContext2D

A CanvasRenderingContext2D object representing a two-dimensional rendering context.

Type:
  • CanvasRenderingContext2D
Source:

Methods


destroy()

Destroys this canvas.

Source:

resize(width, height)

Resizes the canvas to the specified width and height.

Parameters:
Name Type Description
width number

the new width of the canvas

height number

the new height of the canvas

Source: