Class: CanvasRenderer

THING.CanvasRenderer(param)

CanvasRenderer The canvas renderer.

Constructor

new CanvasRenderer(param)

The renderer to draw on canvas.
Parameters:
Name Type Description
param Object The initial parameters.
Source:

Methods

renderFromHTML(html, options) → {Promise}

Render from the html text.
Parameters:
Name Type Description
html String The string of DOM Node object to render.
options Object Rendering options
Properties
Name Type Description
bgcolor String color for the background, any valid CSS color value.
filter function Should return true if passed node should be included in the output (excluding node means excluding it's children as well). Not called on the root node.
Source:
Returns:
A promise that is fulfilled with a canvas object.
Type
Promise