Mercurial > MadButterfly
view nodejs/testcase.js @ 566:6639d386db78 Android_Skia
Function of add a shape to a coord in Javascript.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 08 Jun 2010 09:08:23 +0800 |
parents | c0bc60448913 |
children | a12c3448afb6 |
line wrap: on
line source
var mbfly = require("mbfly"); var r = mbfly.Hello(" test"); var sys = require("sys"); sys.puts(r); var mb_rt = new mbfly.mb_rt(":0.0", 300, 200); var root = mb_rt.root; sys.puts("root matrix: " + [root[0], root[1], root[2], root[3], root[4], root[5]]); var coord = mb_rt.coord_new(root); sys.puts("coord matrix: " + [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,100 L 200,200"); sys.puts(path); sys.puts(coord.add_shape); coord.add_shape(path); setTimeout(function() { sys.puts("timeout"); }, 1000);