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

Members

canvasHTMLCanvasElement

The Canvas object that belongs to this CanvasRenderTarget.

contextCanvasRenderingContext2D

A CanvasRenderingContext2D object representing a two-dimensional rendering context.

heightnumber

The height of the canvas buffer in pixels.

widthnumber

The width of the canvas buffer in pixels.

Methods

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 Mon Dec 03 2018 17:48:51 GMT+0800 (CST)