Derived work of Walter Zorn's VectorGraphics library (see http://www.walterzorn.de/en/jsgraphics/jsgraphics_e.htm)