annotate nodejs/testcase.js @ 565:c0bc60448913 Android_Skia

Constructor for path objects in Javascript domain
author Thinker K.F. Li <thinker@branda.to>
date Mon, 07 Jun 2010 22:37:51 +0800
parents bc207070e3d5
children 6639d386db78
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);
c0bc60448913 Constructor for path objects in Javascript domain
Thinker K.F. Li <thinker@branda.to>
parents: 563
diff changeset
17
549
6ec4d7e90480 Nodejs testcase in Javascript
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
18 setTimeout(function() { sys.puts("timeout"); }, 1000);