Class: xrx.engine.Engine

xrx.engine. Engine

(private) new xrx.engine.Engine(opt_engine)

A class representing a graphics rendering engine.
Parameters:
Name Type Description
opt_engine string The rendering engine to be used. If no parameter is overloaded, the engine class searches for the best rendering engine available.
Source:

Members

(private) xrx.engine.Engine#available_ :boolean

Indicates whether a rendering engine could be initialized successfully.
Type:
  • boolean
Source:

xrx.engine.Engine#canvas_ :xrx.canvas.Canvas|xrx.svg.Canvas|xrx.vml.Canvas

The canvas rendering element of this engine.
Type:
Source:

(private) xrx.engine.Engine#name_ :string

Name of the rendering engine.
Type:
  • string
Source:
See:

Methods

xrx.engine.Engine#createCanvas_(The) → {xrx.canvas.Canvas|xrx.svg.Canvas|xrx.vml.Canvas}

Creates a new canvas element.
Parameters:
Name Type Description
The HTMLElement HTML element to append the new canvas.
Source:
Returns:
The canvas element.
Type
xrx.canvas.Canvas | xrx.svg.Canvas | xrx.vml.Canvas

xrx.engine.Engine#createCircle() → {xrx.canvas.Circle|xrx.svg.Circle|xrx.vml.Circle}

Creates a new circle element.
Source:
Returns:
The circle element.
Type
xrx.canvas.Circle | xrx.svg.Circle | xrx.vml.Circle

xrx.engine.Engine#createEllipse() → {xrx.canvas.Ellipse|xrx.svg.Ellipse|xrx.vml.Ellipse}

Creates a new ellipse element.
Source:
Returns:
The ellipse element.
Type
xrx.canvas.Ellipse | xrx.svg.Ellipse | xrx.vml.Ellipse

xrx.engine.Engine#createGroup() → {xrx.canvas.Group|xrx.svg.Group|xrx.vml.Group}

Creates a new group element.
Source:
Returns:
The group element.
Type
xrx.canvas.Group | xrx.svg.Group | xrx.vml.Group

xrx.engine.Engine#createImage() → {xrx.canvas.Image|xrx.svg.Image|xrx.vml.Image}

Creates a new image element.
Source:
Returns:
The image element.
Type
xrx.canvas.Image | xrx.svg.Image | xrx.vml.Image

xrx.engine.Engine#createLine() → {xrx.canvas.Line|xrx.svg.Line|xrx.vml.Line}

Creates a new line element.
Source:
Returns:
The line element.
Type
xrx.canvas.Line | xrx.svg.Line | xrx.vml.Line

xrx.engine.Engine#createPolygon() → {xrx.canvas.Polygon|xrx.svg.Polygon|xrx.vml.Polygon}

Creates a new polygon element.
Source:
Returns:
The polygon element.
Type
xrx.canvas.Polygon | xrx.svg.Polygon | xrx.vml.Polygon

xrx.engine.Engine#createPolyline() → {xrx.canvas.Polyline|xrx.svg.Polyline|xrx.vml.Polyline}

Creates a new polyline element.
Source:
Returns:
The polyline element.
Type
xrx.canvas.Polyline | xrx.svg.Polyline | xrx.vml.Polyline

xrx.engine.Engine#createRect() → {xrx.canvas.Rect|xrx.svg.Rect|xrx.vml.Rect}

Creates a new rect element.
Source:
Returns:
The rect element.
Type
xrx.canvas.Rect | xrx.svg.Rect | xrx.vml.Rect

(private) xrx.engine.Engine#findOptimalRenderer_()

Source:

(private) xrx.engine.Engine#forceRenderer_()

Source:

xrx.engine.Engine#getCanvas() → {xrx.canvas.Canvas|xrx.svg.Canvas|xrx.vml.Canvas}

Returns the canvas rendering element of this engine.
Source:
Returns:
The canvas rendering element.
Type
xrx.canvas.Canvas | xrx.svg.Canvas | xrx.vml.Canvas

xrx.engine.Engine#getName() → {xrx.canvas|xrx.svg|xrx.vml}

Returns the name of this rendering engine.
Source:
Returns:
The name.
Type
xrx.canvas | xrx.svg | xrx.vml

(private) xrx.engine.Engine#init_()

Source:

xrx.engine.Engine#isAvailable() → {boolean}

Whether this rendering engine could be initialized successfully.
Source:
Returns:
Whether the engine is available for use.
Type
boolean

xrx.engine.Engine#typeOf(name) → {boolean}

Whether the overloaded engine name is the current.
Parameters:
Name Type Description
name xrx.engine.CANVAS | xrx.engine.SVG | xrx.engine.VML The engine name.
Source:
Returns:
Whether the engine matches.
Type
boolean