X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxpoly%2Ftest.c;h=6e698ca2b874d5a2ea5453f94f4d9c6019796b85;hp=74c6497b81440e50cc476b185cc506bfc5b5ca68;hb=bf04757cd94e94c1f67fa3d2a4e3e59fa5bce0c0;hpb=c41f4433d3e721073c60d55cd923a087761e45f7;ds=sidebyside diff --git a/lib/gfxpoly/test.c b/lib/gfxpoly/test.c index 74c6497..6e698ca 100644 --- a/lib/gfxpoly/test.c +++ b/lib/gfxpoly/test.c @@ -37,7 +37,7 @@ int test1() b = gfxline_append(b, box1); b = gfxline_append(b, box2); b = gfxline_append(b, box3); - b = gfxline_append(b, star); + //b = gfxline_append(b, star); gfxmatrix_t matrix; memset(&matrix, 0, sizeof(gfxmatrix_t)); @@ -45,7 +45,7 @@ int test1() matrix.m00=cos(ua);matrix.m10=sin(ua); matrix.m01=-sin(ua);matrix.m11=cos(ua); - gfxline_transform(b, &matrix); + //gfxline_transform(b, &matrix); gfxpoly_t*poly = gfxpoly_fillToPoly(b, 0.05); gfxline_free(box1); gfxline_free(box2); @@ -172,8 +172,14 @@ void test3() swf_ShapeSetAll(tag,s,0,0,0,fs,0); edge_t*e = poly2->edges; while(e) { +#define ROTATE +#ifdef ROTATE + swf_ShapeSetMove(tag, s, e->a.y, e->a.x); + swf_ShapeSetLine(tag, s, e->b.y - e->a.y, e->b.x - e->a.x); +#else swf_ShapeSetMove(tag, s, e->a.x, e->a.y); swf_ShapeSetLine(tag, s, e->b.x - e->a.x, e->b.y - e->a.y); +#endif e = e->next; } #else @@ -255,5 +261,5 @@ void test4() int main() { - test4(); + test3(); }