Class: CanvasRenderTarget

Tiny. CanvasRenderTarget

Creates a Canvas element of the given size.

new Tiny.CanvasRenderTarget(width, height, resolution)

Name Type Default Description
width number

the width for the newly created canvas

height number

the height for the newly created canvas

resolution number 1 optional

The resolution / device pixel ratio of the canvas



The Canvas object that belongs to this CanvasRenderTarget.


A CanvasRenderingContext2D object representing a two-dimensional rendering context.


The height of the canvas buffer in pixels.


The width of the canvas buffer in pixels.


Destroys this canvas.

Resizes the canvas to the specified width and height.

Name Type Description
width number

the new width of the canvas

height number

the new height of the canvas

Documentation generated by JSDoc 3.4.3 on Fri Jul 09 2021 19:32:26 GMT+0800 (CST)