Pablo

toCanvas()

Converts the collection to an HTML <canvas> element and returns the canvas. The canvas will be resized to fit its contents.

var canvas = Pablo.circle({r:50}).toCanvas();

canvas.appendTo(demoElement);
alert(demoElement.innerHTML);

toCanvas(callback)

As above, but passes the collection containing the <canvas> element to the callback function when the image has been applied to the canvas. The callback’s this object will be the original collection.

toCanvas(callback, canvas)

As above, but will apply an image of the collection to an existing canvas element (or a collection containing the canvas).

Browser support

All modern browsers support HTML canvas. To confirm, check that Pablo.support.canvas === true.

if (Pablo.support.canvas){
    // create canvas
}
else {
    // fallback
}
Painting is just another way of keeping a diary.
Pablo Picasso