CanvasElement

CanvasElement

package js-html

extends ElementDOMElementNodeEventTarget

Available on js

The HTMLCanvasElement interface provides properties and methods for manipulating the layout and presentation of canvas elements. The HTMLCanvasElement interface also inherits the properties and methods of the HTMLElement interface.

Documentation HTMLCanvasElement by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Variables

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.

Methods

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–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/CanvasElement.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部