diff options
author | Matthias Kramm <kramm@quiss.org> | 2009-05-01 23:13:36 +0200 |
---|---|---|
committer | Matthias Kramm <kramm@quiss.org> | 2009-05-01 23:13:36 +0200 |
commit | bf04757cd94e94c1f67fa3d2a4e3e59fa5bce0c0 (patch) | |
tree | 09492ea9e128ffe50830455a44836c8b49a1b8e6 /lib/gfxpoly/test.c | |
parent | c41f4433d3e721073c60d55cd923a087761e45f7 (diff) |
polygon intersector: added horizontal line reconstruction
Diffstat (limited to 'lib/gfxpoly/test.c')
-rw-r--r-- | lib/gfxpoly/test.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/gfxpoly/test.c b/lib/gfxpoly/test.c index 74c6497b..6e698ca2 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(); } |