annotate nodejs/testcase.js @ 567:a12c3448afb6 Android_Skia

Add dummy paint_color templates
author Thinker K.F. Li <thinker@branda.to>
date Wed, 09 Jun 2010 12:28:03 +0800
parents 6639d386db78
children d796e6b8b97e
rev   line source
549
6ec4d7e90480 Nodejs testcase in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
1 var mbfly = require("mbfly");
6ec4d7e90480 Nodejs testcase in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
2 var r = mbfly.Hello(" test");
6ec4d7e90480 Nodejs testcase in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3 var sys = require("sys");
6ec4d7e90480 Nodejs testcase in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
4 sys.puts(r);
6ec4d7e90480 Nodejs testcase in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
5
558
d61133da2845 New MadButterfly runtime object install of calling function
Thinker K.F. Li <thinker@branda.to>
parents: 556
diff changeset
6 var mb_rt = new mbfly.mb_rt(":0.0", 300, 200);
563
bc207070e3d5 Fix issue of im-properly using persistent handler for coord object template.
Thinker K.F. Li <thinker@branda.to>
parents: 562
diff changeset
7 var root = mb_rt.root;
bc207070e3d5 Fix issue of im-properly using persistent handler for coord object template.
Thinker K.F. Li <thinker@branda.to>
parents: 562
diff changeset
8 sys.puts("root matrix: " +
bc207070e3d5 Fix issue of im-properly using persistent handler for coord object template.
Thinker K.F. Li <thinker@branda.to>
parents: 562
diff changeset
9 [root[0], root[1], root[2], root[3], root[4], root[5]]);
bc207070e3d5 Fix issue of im-properly using persistent handler for coord object template.
Thinker K.F. Li <thinker@branda.to>
parents: 562
diff changeset
10 var coord = mb_rt.coord_new(root);
bc207070e3d5 Fix issue of im-properly using persistent handler for coord object template.
Thinker K.F. Li <thinker@branda.to>
parents: 562
diff changeset
11 sys.puts("coord matrix: " +
bc207070e3d5 Fix issue of im-properly using persistent handler for coord object template.
Thinker K.F. Li <thinker@branda.to>
parents: 562
diff changeset
12 [coord[0], coord[1], coord[2], coord[3], coord[4], coord[5]]);
549
6ec4d7e90480 Nodejs testcase in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
13
565
c0bc60448913 Constructor for path objects in Javascript domain
Thinker K.F. Li <thinker@branda.to>
parents: 563
diff changeset
14 sys.puts(mb_rt.path_new);
c0bc60448913 Constructor for path objects in Javascript domain
Thinker K.F. Li <thinker@branda.to>
parents: 563
diff changeset
15 var path = mb_rt.path_new("m 100,100 L 200,200");
c0bc60448913 Constructor for path objects in Javascript domain
Thinker K.F. Li <thinker@branda.to>
parents: 563
diff changeset
16 sys.puts(path);
566
6639d386db78 Function of add a shape to a coord in Javascript.
Thinker K.F. Li <thinker@branda.to>
parents: 565
diff changeset
17 sys.puts(coord.add_shape);
6639d386db78 Function of add a shape to a coord in Javascript.
Thinker K.F. Li <thinker@branda.to>
parents: 565
diff changeset
18 coord.add_shape(path);
565
c0bc60448913 Constructor for path objects in Javascript domain
Thinker K.F. Li <thinker@branda.to>
parents: 563
diff changeset
19
567
a12c3448afb6 Add dummy paint_color templates
Thinker K.F. Li <thinker@branda.to>
parents: 566
diff changeset
20 sys.puts(mb_rt.paint_color_new);
a12c3448afb6 Add dummy paint_color templates
Thinker K.F. Li <thinker@branda.to>
parents: 566
diff changeset
21
549
6ec4d7e90480 Nodejs testcase in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
22 setTimeout(function() { sys.puts("timeout"); }, 1000);