Class zebkit.ui.web.HtmlCanvas
extends <zebkit.ui.web.HtmlElement>
<zebkit.ui.web>

HTML Canvas native DOM element wrapper.

Constructor:
zebkit.ui.web.HtmlCanvas ([e])

Parameters:
  • [e] <HTMLCanvas>

    HTML canvas element to be wrapped as a zebkit UI component or nothing to create a new canvas element





Inherited methods:
$setConstraints(c)    add(constr, d)    byConstraints([p], c)    byPath(path, [cb])    calcPreferredSize(target)    doLayout( )    fire(event, [path], [params])    focused( )    getBottom( )    getCanvas( )    getComponentAt(x, y)    getHorPadding( )    getLeft( )    getPreferredSize( )    getRight( )    getTop( )    getVerPadding( )    hasFocus( )    indexOf(c)    insert(i, constr, d)    invalidate( )    invalidateLayout( )    kidAdded(index, constr, l)    kidRemoved(i, l)    laidout( )    load(JSON)    off([eventName], [path], [cb])    on([eventName], [path], cb)    paintComponent(g)    paintViewAt(g, ax, ay, v)    properties([path], props)    property([path], name, value)    recalc( )    relocated(px, py)    remove(c)    removeAll( )    removeAt(i)    removeByConstraints(ctr)    removeMe([after])    repaint([x], [y], [w], [h])    requestFocus( )    requestFocusIn([timeout])    resized(pw, ph)    setAt(i, d)    setAttribute(name, value)    setAttributes(attrs)    setBackground(v)    setBorder([v])    setBottomPadding(bottom)    setBounds(x, y, w, h)    setByConstraints(constr, c)    setColor(c)    setConstraints(ctr)    setContent(an)    setEnabled(b)    setFont(f)    setId(id)    setKids(a)    setLayout(m)    setLeftPadding(left)    setLocation(xx, yy)    setPadding(v)    setParent(o)    setPreferredSize(w, h)    setProperties([path], props)    setRightPadding(right)    setSize(w, h)    setStyle(a, a)    setStyles(styles)    setTopPadding(top)    setVisible(b)    toBack( )    toFront( )    toPreferredHeight( )    toPreferredSize( )    toPreferredWidth( )    toView(target)    update(g)    validate( )    validateMetric( )    vrp( )   


public chainable crotate (r)

Rotate the component coordinate system around the component center.


Parameters:
protected <Array> project (x, y)

Convert (x, y) location in


Parameters:
  • x <Integer>

    a x coordinate

  • y <Integer>

    an y coordinate


Returns: <Array>

two elements array where first element is converted x coordinate and the second element is converted y coordinate.



Inherited attributes:
private HTMLElement $container    public zebkit.draw.View bg    public zebkit.draw.View border    public Boolean canHaveFocus    public Object constraints    public HTMLElement element    public Integer height    private Boolean isDOMElement    public Boolean isEnabled    public Boolean isValid    public Boolean isVisible    public Array kids    public zebkit.layout.Layout layout    public zebkit.layout.Layoutable parent    public Integer width    public Integer x    public Integer y   



private <CanvasRenderingContext2D> $context

Canvas context

private <Object x:Integer, y:Integer, width:Integer, height:Integer> $da

Keeps rectangular "dirty" area of the canvas component