Class: xrx.canvas.Canvas

xrx.canvas. Canvas

(private) new xrx.canvas.Canvas(element)

Canvas rendering class representing a canvas.
Parameters:
Name Type Description
element HTMLCanvasElement The HTML canvas element.
Source:

Members

xrx.canvas.Canvas#element_ :HTMLCanvasElement

The HTML canvas element.
Type:
  • HTMLCanvasElement
Source:

xrx.canvas.Canvas#height_ :number

The canvas height.
Type:
  • number
Source:

xrx.canvas.Canvas#width_ :number

The canvas width.
Type:
  • number
Source:

Methods

(static) xrx.canvas.Canvas.create(parent)

Creates a new canvas.
Parameters:
Name Type Description
parent Element The parent HTML element to which the canvas shall be appended.
Source:

xrx.canvas.Canvas#finishDrawing()

Finishes drawing this canvas.
Source:

xrx.canvas.Canvas#getElement() → {HTMLCanvasElement}

Returns the HTML canvas element.
Source:
Returns:
The HTML canvas element.
Type
HTMLCanvasElement

xrx.canvas.Canvas#getEventTarget() → {HTMLCanvasElement}

Returns the root element of this canvas to be used as the event target.
Source:
Returns:
The event target element.
Type
HTMLCanvasElement

xrx.canvas.Canvas#getHeight() → {number}

Returns the height of the canvas.
Source:
Returns:
The height.
Type
number

xrx.canvas.Canvas#getWidth() → {number}

Returns the width of the canvas.
Source:
Returns:
The width.
Type
number

xrx.canvas.Canvas#setHeight(width)

Sets the height of the canvas.
Parameters:
Name Type Description
width number the height.
Source:

xrx.canvas.Canvas#setWidth(width)

Sets the width of the canvas.
Parameters:
Name Type Description
width number the width.
Source:

xrx.canvas.Canvas#startDrawing()

Starts drawing this canvas.
Source: