annotate nodejs/testsvg.js @ 714:f53e45d1fcd0

Translate the svg.js as a nodejs module.
author wycc
date Fri, 13 Aug 2010 23:38:29 +0800
parents
children 72abb4154936
rev   line source
714
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
1 var svg = require("./svg");
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
2 var mbfly = require("mbfly");
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
3 var mb_rt = new mbfly.mb_rt(":0.0", 720,480);
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
4 var ldr = mbfly.img_ldr_new(".");
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
5 var background = mb_rt.rect_new(0, 0, 720, 480, 0, 0);
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
6 var paint = mb_rt.paint_color_new(1, 1, 1, 1);
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
7 paint.fill(background);
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
8 mb_rt.root.add_shape(background);
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
9
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
10 svg.loadSVG(mb_rt,mb_rt.root,"test.svg");
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
11 mb_rt.redraw_all();
f53e45d1fcd0 Translate the svg.js as a nodejs module.
wycc
parents:
diff changeset
12 mb_rt.flush();