Description

Manage canvas element

Example

Properties

width

canvas width

height

canvas height

mouseEvent

if false, disables `mouseover`, `mouseout` and `mousemove` to improve performance

Methods

getMousePosition

Get the X and Y position of the mouse in the canvas

measureText

Returns an object that contains the width and height (only >=1.3.2) of the specified text

createPattern

Returns a pattern

createLinearGradient

View http://www.w3schools.com/tags/canvas_createlineargradient.asp

createRadialGradient

View http://www.w3schools.com/tags/canvas_createradialgradient.asp

addColorStop

View http://www.w3schools.com/tags/canvas_addcolorstop.asp

clear

Erases the content of canvas

isFullscreen

`(>=1.2.6)` Tests if the canvas is full screen (HTML5 only)

setSize

`(>=1.2.6)` Change the size of the canvas or put in full screen > Tested on : > * Windows 7 - Chrome 26, Firefox 20, Internet Explorer 9 and 10, Opera 12.15, Safari 5.1.7 > * iPad ; iOS 6.1.2 - Safari, Google Chrome > * Android 2.3.4 - Default Android Browser, Firefox

Discussion