Html5 Canvas Display List

Html5 Canvas is a cool component, but:

  • without a Display List many developers loose their time to draw simple geometric polygons
  • without interaction, polygons are motionless and dead


So, I’ve began to write a Javascript library to fill this gap.

My idea is to write simple classes to:

  • wrap obvious polygons attributes
  • make polygon interactive (dragging, clicking)

Code Snip

var displayList = new DisplayList("canvas");
var circle = new Circle(200, 100, 50, draggable);
var rectangle = new Rectangle(100, 100, 40, 40, draggable);	
	
displayList.add( rectangle );
displayList.add( circle );
displayList.render();	
This entry was posted in Canvas, Html5, Javascript and tagged , , , , . Bookmark the permalink.

One Response to Html5 Canvas Display List

  1. Hello, I discovered your blog in a new directory of blogs. I dont know how your blog came up. Your weblog looks good. Have a good day.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>