Mercurial > MadButterfly
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 | 1 var svg = require("./svg"); |
2 var mbfly = require("mbfly"); | |
3 var mb_rt = new mbfly.mb_rt(":0.0", 720,480); | |
4 var ldr = mbfly.img_ldr_new("."); | |
5 var background = mb_rt.rect_new(0, 0, 720, 480, 0, 0); | |
6 var paint = mb_rt.paint_color_new(1, 1, 1, 1); | |
7 paint.fill(background); | |
8 mb_rt.root.add_shape(background); | |
9 | |
10 svg.loadSVG(mb_rt,mb_rt.root,"test.svg"); | |
11 mb_rt.redraw_all(); | |
12 mb_rt.flush(); |