Back to main page: Draw Lines, Circles, Ellipses, Polygons, Polylines

Short History of Updates
v 3.05 (2. 2. 2009):  Fixed: Should now work also in IE8 ('px' units were missing).
v 3.03 (28. 1. 2008):  + width and height parameters of drawImage() are now optional. Added by Mahmut Keygubatli.
v 3.0 (4. 2. 2007):  + Added fillArc() method, of course based on the same optimization principles as the other shapes (e.g. 10 - 15 times faster than fillArc implementations I've seen based on the library's fillPolygon() method).
+ Now the jsGraphics() constructor function accepts also a direct reference to the canvas DIV.
* Within each canvas an additional container DIV is created, in order to protect the default content of the canvas more reliably.
- Support of Netscape 4 dropped.
v 2.36 (21. 6. 2006):  Fixed: JS error in Safari when the graphics were drawn into another window. Thanks to Marianne Roger for the patch.
v 2.35 (29. 5. 2006):  Enhanced error checking, no JavaScript error anymore if a canvas doesn't exist.
v 2.34 (23. 5. 2006):  Fixed: Size of images drawn with drawImage() method was not always correct in Firefox.
v 2.33 (24. 10. 2005):  Fixed: Lines of length 0 px but wider than 3 px are now displayed correctly (no longer as vertical line being too long).
v 2.32 (21. 6. 2005):  drawImage() method accepts an optional fifth parameter which can be used to insert an eventhandler into the image. Thanks to Pavel Illich(?) from Russia for that suggestion.
v 2.31 (28. 3. 2005):  drawStringRect() method added. Courtesy Rick Blommers.
v 2.3 (14. 2. 2004):  drawImage() method added. Work-around for "overflow:hidden" bug of Mozilla 1.6
v 2.2 (8. 2. 2004):  fillPolygon() method implemented by Matthieu Haller from France. Thanks also to Kirsten Schulz and others.
v 2.11 (18. 12. 2003):  And again faster in IE. Thanks to John Holdsworth who has further optimized the internal RegExp-transformation of the graphics html.
v 2.1 (3. 11. 2003):  Again faster in IE (this was achieved by Thomas Frank from Sweden who discovered and implemented the trick to generate internally a strongly abridged graphics HTML which is transformed into normal HTML when being rendered).
v 2.03 (11. 6. 2003):  Can draw to different frames, or even windows generated by JavaScript. To accomplish this, the constructor function jsGraphics() optionally accepts a second parameter which must be a reference to the desired frame/window.
v 2.02 (12. 5. 2003):  Dotted lines available (of course also for rectangles, polygons, ellipses).
v 2.01 (7. 4. 2003):  wz_jsgraphics.js now can draw printable shapes.
v 2.0 (31. 3. 2003):  Now the library is capable to draw lines of specifiable thickness. Moreover, rendering thick lines is almost as fast as rendering 1 px wide lines.
v 1.42 (28. 2. 2003):  drawString() method doesn't permit browsers anymore to break lines automatically/un-intendedly.
v 1.41 (21. 2. 2003):  paint() method as fast again as it had been prior to the implementation of the "Draw into the document" option.
v 1.4 (17. 2. 2003):  Now a mode is available to draw directly into the document while the page is parsed. Since this mode renders the graphics html by use of 'document.write()', it works fine even in Opera 5/6 and Netscape 4.
v 1.31 (11. 2. 2003):  clear() method essentially faster in Gecko browsers (had been quite slow). Drawing in all browsers slightly faster again (no object detections in paint() anymore).
v 1.3 (5. 2. 2003):  Much faster in IE and Opera 7, especially if new graphics are added to already existing content within a canvas. No DIV overlap anymore along the horizontal diameters of filled ellipses. (This problem only showed up if opacity filters were applied.)
v 1.26 (10. 1. 2003):  Ellipse processing another tiny bit faster (less bit shifts inside loop).
v 1.25 (17. 12. 2002):  No branch decisions inside the function that generates the DIVs => slightly faster.
v 1.24 (16. 12. 2002):  Works in Konqueror 3 again (v 1.23 didn't).
v 1.23 (15. 12. 2002):  Increased speed in Gecko-Engine browsers, since dynamically generated html nodes now are appended to DOM tree more efficiently.
v 1.22 (15. 12. 2002):  Average speed of line processing slightly increased.
v 1.1 (12. 2002)  
v 1.2
v 1.21
Increased ellipse processing speed .

    Top of page

Walter Zorn, Munich, 2005
Impressum and about this page