Mercurial > MadButterfly
view 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 |
line wrap: on
line source
var svg = require("./svg"); var mbfly = require("mbfly"); var mb_rt = new mbfly.mb_rt(":0.0", 720,480); var ldr = mbfly.img_ldr_new("."); var background = mb_rt.rect_new(0, 0, 720, 480, 0, 0); var paint = mb_rt.paint_color_new(1, 1, 1, 1); paint.fill(background); mb_rt.root.add_shape(background); svg.loadSVG(mb_rt,mb_rt.root,"test.svg"); mb_rt.redraw_all(); mb_rt.flush();