new CanvasBuffer(width, height)
Creates a Canvas element of the given size.
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
 
- 
    height : Number
- 
    
    The height of the Canvas in pixels. Type:- Number
 
- 
    width : Number
- 
    
    The width of the Canvas in pixels. Type:- Number
 
Methods
- 
    destroy()
- 
    
    Frees the canvas up for use again. 
- 
    resize(width, height)
- 
    
    Resizes the canvas to the specified width and height. Parameters:Name Type Description widthNumber the new width of the canvas heightNumber the new height of the canvas