comparison 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
comparison
equal deleted inserted replaced
570:49e79253b6d3 571:13b15b7a463b
10 var coord = mb_rt.coord_new(root); 10 var coord = mb_rt.coord_new(root);
11 sys.puts("coord matrix: " + 11 sys.puts("coord matrix: " +
12 [coord[0], coord[1], coord[2], coord[3], coord[4], coord[5]]); 12 [coord[0], coord[1], coord[2], coord[3], coord[4], coord[5]]);
13 13
14 sys.puts(mb_rt.path_new); 14 sys.puts(mb_rt.path_new);
15 var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 150,150 z"); 15 var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 180,150 z");
16 sys.puts(path); 16 sys.puts(path);
17 sys.puts(coord.add_shape); 17 sys.puts(coord.add_shape);
18 coord.add_shape(path); 18 coord.add_shape(path);
19 19
20 sys.puts(mb_rt.paint_color_new); 20 sys.puts(mb_rt.paint_color_new);
24 24
25 sys.puts(path.stroke_width); 25 sys.puts(path.stroke_width);
26 path.stroke_width = 2; 26 path.stroke_width = 2;
27 sys.puts(path.stroke_width); 27 sys.puts(path.stroke_width);
28 28
29 mb_rt.redraw_all();
30
31 var i = 0;
32 setInterval(function() {
33 var deg = (i++) * 0.1;
34 coord[2] = (i % 20) * 10;
35 mb_rt.redraw_changed();
36 }, 50);
29 setTimeout(function() { sys.puts("timeout"); }, 1000); 37 setTimeout(function() { sys.puts("timeout"); }, 1000);