Mercurial > MadButterfly
comparison nodejs/testcase.js @ 569:f87a368e847a Android_Skia
Functions of stroke and fill a shape
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 09 Jun 2010 14:44:20 +0800 |
parents | d796e6b8b97e |
children | 49e79253b6d3 |
comparison
equal
deleted
inserted
replaced
568:d796e6b8b97e | 569:f87a368e847a |
---|---|
10 var coord = mb_rt.coord_new(root); | 10 var coord = mb_rt.coord_new(root); |
11 sys.puts("coord matrix: " + | 11 sys.puts("coord matrix: " + |
12 [coord[0], coord[1], coord[2], coord[3], coord[4], coord[5]]); | 12 [coord[0], coord[1], coord[2], coord[3], coord[4], coord[5]]); |
13 | 13 |
14 sys.puts(mb_rt.path_new); | 14 sys.puts(mb_rt.path_new); |
15 var path = mb_rt.path_new("m 100,100 L 200,200"); | 15 var path = mb_rt.path_new("m 100,50 L 120,50 L 200,150 L 150,150 z"); |
16 sys.puts(path); | 16 sys.puts(path); |
17 sys.puts(coord.add_shape); | 17 sys.puts(coord.add_shape); |
18 coord.add_shape(path); | 18 coord.add_shape(path); |
19 | 19 |
20 sys.puts(mb_rt.paint_color_new); | 20 sys.puts(mb_rt.paint_color_new); |
21 var paint = mb_rt.paint_color_new(1, 1, 1, 1); | 21 var paint = mb_rt.paint_color_new(1.0, 1.0, 1.0, 1.0); |
22 sys.puts(paint); | 22 sys.puts(paint); |
23 paint.stroke(path); | |
23 | 24 |
24 setTimeout(function() { sys.puts("timeout"); }, 1000); | 25 setTimeout(function() { sys.puts("timeout"); }, 1000); |