Canvas Animation Kit Experiment... ...how to clear the canvas?

Posted by Ted Wong on Stack Overflow See other posts from Stack Overflow or by Ted Wong
Published on 2009-09-13T12:12:37Z Indexed on 2010/12/30 4:54 UTC
Read the original article Hit count: 239

Filed under:
|
|
|
|

I can make a obj to use the canvas to draw like this:

MyObj.myDiv = new Canvas($("effectDiv"), Setting.width,  Setting.height);

Then, I use this to draw a rectangle on the canvas:

	var c =  new Rectangle(80, 80,
		{
			fill: [220, 40, 90]
		}
	);
	var move = new Timeline;
	move.addKeyframe(0,
		{
			x: 0,
			y: 0
		}
	);
	c.addTimeline(move);
	MyObj.myDiv.append(c);

But after I draw the rectangle, I want clear the canvas, but I don't know which method and how to do this... ...

O...one more thing: it is the CAKE's web site: Link

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html