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 |
Members
-
canvas :HTMLCanvasElement
-
The Canvas object that belongs to this CanvasBuffer.
Type:
- HTMLCanvasElement
-
context :CanvasRenderingContext2D
-
A CanvasRenderingContext2D object representing a two-dimensional rendering context.
Type:
- CanvasRenderingContext2D
Methods
-
destroy()
-
Destroys this canvas.
-
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