package js.html
extends Element › DOMElement › Node › EventTarget
Available on jsThe
HTMLCanvasElement
interface provides properties and methods for manipulating the layout and presentation of canvas elements. TheHTMLCanvasElement
interface also inherits the properties and methods of theHTMLElement
interface.Documentation HTMLCanvasElement by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
height:Int
Is a positive integer
reflecting the height
HTML attribute of the canvas
element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150
is used.
width:Int
Is a positive integer
reflecting the width
HTML attribute of the canvas
element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300
is used.
getContext (contextId:String, ?contextOptions:Dynamic):Dynamic
Throws:
null |
DOMError |
---|
inline getContext2d (?attribs:{}):CanvasRenderingContext2D
Shorthand for getting a CanvasRenderingContext2D.
inline getContextWebGL (?attribs:ContextAttributes):RenderingContext
Shorthand for getting a js.html.webgl.RenderingContext.
toBlob (callback:Blob ‑> Void, type:String = "", ?encoderOptions:Dynamic):Void
Throws:
null |
DOMError |
---|
toDataURL (type:String = "", ?encoderOptions:Dynamic):String
Throws:
null |
DOMError |
---|
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/CanvasElement.html