Drawling lines in JavaScript
Written by on December 11th, 2006 in Ajax News.
If you have ever wondered how to use the Bresenham algorithm to draw lines in browsers, it is your lucky day.
The article teaches us the way, and you end up with an API such as:
JAVASCRIPT:
-
-
var g = new Graphics();
-
g.drawLine(100,50,200,70);
-
g.paint();
-
Source: Ajaxian
Original Article: http://ajaxian.com/archives/drawling-lines-in-javascript
