class js.html.CanvasElement extends Element

Available on js

DOM canvas elements expose the HTMLCanvasElement interface, which provides properties and methods for manipulating the layout and presentation of canvas elements. The HTMLCanvasElement interface inherits the properties and methods of the element object interface.

Documentation for this class was provided by MDN.

Instance Fields

var height:Int

Reflects the

height HTML attribute, specifying the height of the coordinate space in CSS pixels.

var width:Int

Reflects the

width HTML attribute, specifying the width of the coordinate space in CSS pixels.

function getContext(contextId:String):Dynamic

function getContext2d():CanvasRenderingContext2D

A typed shortcut for getContext("2d").

function toDataURL(?type:String):String