package js.html
extends Element › DOMElement › Node › EventTarget
Available on jsThe
HTMLCanvasElementinterface provides properties and methods for manipulating the layout and presentation of canvas elements. TheHTMLCanvasElementinterface also inherits the properties and methods of theHTMLElementinterface.Documentation HTMLCanvasElement by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
height:IntIs 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:IntIs 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):DynamicThrows:
null |
DOMError |
|---|
inline getContext2d (?attribs:{}):CanvasRenderingContext2DShorthand for getting a CanvasRenderingContext2D.
inline getContextWebGL (?attribs:ContextAttributes):RenderingContextShorthand for getting a js.html.webgl.RenderingContext.
toBlob (callback:Blob ‑> Void, type:String = "", ?encoderOptions:Dynamic):VoidThrows:
null |
DOMError |
|---|
toDataURL (type:String = "", ?encoderOptions:Dynamic):StringThrows:
null |
DOMError |
|---|
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/CanvasElement.html