Mercurial > MadButterfly
diff nodejs/testcase.js @ 571:13b15b7a463b Android_Skia
Redraw all and changed in Javascript
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 09 Jun 2010 15:39:24 +0800 |
parents | 49e79253b6d3 |
children | a2faee809514 |
line wrap: on
line diff
--- a/nodejs/testcase.js Wed Jun 09 15:10:29 2010 +0800 +++ b/nodejs/testcase.js Wed Jun 09 15:39:24 2010 +0800 @@ -12,7 +12,7 @@ [coord[0], coord[1], coord[2], coord[3], coord[4], coord[5]]); sys.puts(mb_rt.path_new); -var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 150,150 z"); +var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 180,150 z"); sys.puts(path); sys.puts(coord.add_shape); coord.add_shape(path); @@ -26,4 +26,12 @@ path.stroke_width = 2; sys.puts(path.stroke_width); +mb_rt.redraw_all(); + +var i = 0; +setInterval(function() { + var deg = (i++) * 0.1; + coord[2] = (i % 20) * 10; + mb_rt.redraw_changed(); + }, 50); setTimeout(function() { sys.puts("timeout"); }, 1000);