Mercurial > MadButterfly
comparison nodejs/testcase.js @ 742:24038e7a365b
Reorder instructions to invalidate coords correctly
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 25 Aug 2010 11:58:30 +0800 |
parents | 5ac257be7bc0 |
children | dd1f3382d6a4 |
comparison
equal
deleted
inserted
replaced
741:d8764f10e141 | 742:24038e7a365b |
---|---|
39 var rect = mb_rt.rect_new(40, 40, 100, 100, 10, 10); | 39 var rect = mb_rt.rect_new(40, 40, 100, 100, 10, 10); |
40 sys.puts(mb_rt.paint_color_new); | 40 sys.puts(mb_rt.paint_color_new); |
41 var paint = mb_rt.paint_color_new(1, 0.5, 0.5, 0.5); | 41 var paint = mb_rt.paint_color_new(1, 0.5, 0.5, 0.5); |
42 paint.fill(rect); | 42 paint.fill(rect); |
43 root.add_shape(rect); | 43 root.add_shape(rect); |
44 | |
45 /* test removing a coord */ | |
46 var rm_coord = mb_rt.coord_new(root); | |
47 var rm_rect = mb_rt.rect_new(150, 150, 50, 50, 10, 10); | |
48 paint.fill(rm_rect); | |
49 rm_coord.add_shape(rm_rect); | |
50 setTimeout(function() { rm_coord.remove(); }, 3000); | |
44 | 51 |
45 /* Moving a path */ | 52 /* Moving a path */ |
46 sys.puts(mb_rt.path_new); | 53 sys.puts(mb_rt.path_new); |
47 var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 180,150 z"); | 54 var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 180,150 z"); |
48 sys.puts(path); | 55 sys.puts(path); |