Kind: global class
Npmpackage:
- UICanvas
- new UICanvas(id, target, css)
- .context2d :
canvas
- .context3d :
canvas
- .toString() ⇒
string
This is a display object class, extending UIComponent. Unlike other UI elements, this creates a DOM <canvas>.
By extending UIComponent this has all of its native properties and methods. See UIComponent for more info.
Import from ad-ui
Param | Type |
---|---|
id | string |
target | element |
css | object |
Example
import { UICanvas } from 'ad-ui'
var myCanvas = new UICanvas({
id : 'my-btn',
target : View.main,
css : {
x : 15,
y : 18,
width : 50,
height : 20,
backgroundColor : '#ff0000'
}
})
Getter : Returns direct access to the canvas context of '2d'.
Kind: static property of UICanvas
Example
console.log(myCanvas.context2d)
Getter : Returns direct access to the canvas context of 'webgl'.
Kind: static property of UICanvas
Example
console.log(myCanvas.context3d)
A String representing the object type.
Kind: static method of UICanvas
Returns: string
- [object UICanvas]