Two Canvas Projects

2010-07-09 00:00:00 +0100 by Alex R. Young

I recently received emails about two canvas libraries,
canvg and canvas_library. It's funny how we still don't see canvas used that often, given that it's been
available in Safari, Opera and Firefox for a long time, and IE support
is relatively simple through libraries that convert it to VML.


canvg (MIT License) by Gabe Lerner is an SVG parser and renderer that uses the canvas element to display
results (it currently uses FlashCanvas for IE support). There are
extensive demos available.

It even supports animations. The author is aiming for full SVG support;
filters, interactivity, linking, and scripting are currently


canvas_library (BSD License) by Diederick Lawson is a canvas API based on ActionScript 3.0. Usage
looks like this:

var mainDisplayObj = new canvaslib.DisplayContainer("test_canvas");

var shape = new canvaslib.Shape();
shape.x = 10;
shape.y = 10;

shape.fillStyle("rgba(0, 0, 0, 255)");
shape.fillRect(0, 0, 50, 50);

It can also load and draw bitmaps, and handle tween-based animations.