I can get obj to use the canvas to paint like this:
MyObj.myDiv = new Canvas($("effectDiv"), Setting.width, Setting.height);
Then I use it 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 drawing the rectangle I want to clear the canvas, but I do not know what method and how to do it ......
O ... one more thing: a website CAKE: Link
source share