Class: xrx.shape.Canvas

xrx.shape. Canvas

(private) new xrx.shape.Canvas(drawing)

A class representing an engine-independent graphic canvas.
Parameters:
Name Type Description
drawing xrx.drawing.Drawing The parent drawing canvas.
Source:

Methods

xrx.shape.Canvas#draw()

Draws this canvas and all its containers and shapes contained.
Source:

xrx.shape.Canvas#getElement() → {HTMLElement}

Returns the HTML element on which the canvas was created.
Source:
Returns:
The HTML element.
Type
HTMLElement

xrx.shape.Canvas#getEngine() → {xrx.engine.Engine}

Returns the rendering engine.
Source:
Returns:
The rendering engine.
Type
xrx.engine.Engine

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

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

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

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

xrx.shape.Canvas#setHeight(The)

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

xrx.shape.Canvas#setWidth(The)

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