X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=lib%2Fgfxpoly%2Ftest.c;h=766b1a7901a1d9a5a0813bc4d74d51bcdf2c4260;hb=163bdd5cab1758e4517e8365b3e40b5461d63640;hp=e8c140c48d339312c7b6361997085bc66356e7fd;hpb=f5626be739a1e1b61f89d7a389be3c4b5d4d9128;p=swftools.git diff --git a/lib/gfxpoly/test.c b/lib/gfxpoly/test.c index e8c140c..766b1a7 100644 --- a/lib/gfxpoly/test.c +++ b/lib/gfxpoly/test.c @@ -54,21 +54,19 @@ int test1() gfxpoly_process(poly); } -int test2() +int test_square(int width, int height, int num) { -#define N 50 -#define RANGE 150 int t; - gfxline_t* line = malloc(sizeof(gfxline_t)*N); - for(t=0;ta.x*20, e->a.y*20); swf_ShapeSetLine(tag, s, e->b.x*20 - e->a.x*20, e->b.y*20 - e->a.y*20); e = e->next; } +#else + swf_ShapeSetAll(tag,s,0,0,ls,0,0); + edge_t*e = poly2; + while(e) { + swf_ShapeSetMove(tag, s, e->a.x*20, e->a.y*20); + swf_ShapeSetLine(tag, s, e->b.x*20 - e->a.x*20, e->b.y*20 - e->a.y*20); + + swf_ShapeSetCircle(tag, s, e->a.x*20, e->a.y*20, 5*20, 5*20); + swf_ShapeSetCircle(tag, s, e->b.x*20, e->b.y*20, 5*20, 5*20); + e = e->next; + } +#endif + swf_ShapeSetEnd(tag); swf_ShapeFree(s); @@ -166,5 +192,5 @@ void test3() int main() { - test3(); + test2(); }