CanvasBuffer Class
Creates a Canvas element of the given size.
Constructor
CanvasBuffer
(
-
width -
height
Parameters:
-
widthNumberthe width for the newly created canvas
-
heightNumberthe height for the newly created canvas
Methods
clear
()
private
Clears the canvas that was created by the CanvasBuffer class.
resize
(
-
width -
height
Resizes the canvas to the specified width and height.
Parameters:
-
widthNumberthe new width of the canvas
-
heightNumberthe new height of the canvas
Properties
canvas
HTMLCanvasElement
The Canvas object that belongs to this CanvasBuffer.
context
CanvasRenderingContext2D
A CanvasRenderingContext2D object representing a two-dimensional rendering context.
height
Number
The height of the Canvas in pixels.
width
Number
The width of the Canvas in pixels.
