Mercurial > MadButterfly
diff nodejs/testcase.js @ 690:86c6ebf1de25
Add JS binding for sh_rect_t
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 07 Aug 2010 23:00:16 +0800 |
parents | b601a4d6f7d1 |
children | 8b7964869f7a f46a0771fd30 |
line wrap: on
line diff
--- a/nodejs/testcase.js Sat Aug 07 22:33:02 2010 +0800 +++ b/nodejs/testcase.js Sat Aug 07 23:00:16 2010 +0800 @@ -19,6 +19,13 @@ paint.fill(img); root.add_shape(img); +/* test alpha blending and rectangle */ +var rect = mb_rt.rect_new(40, 40, 100, 100, 10, 10); +sys.puts(mb_rt.paint_color_new); +var paint = mb_rt.paint_color_new(1, 0.5, 0.5, 0.5); +paint.fill(rect); +root.add_shape(rect); + /* Moving a path */ sys.puts(mb_rt.path_new); var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 180,150 z");