X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxpoly%2Factive.c;h=2904e08018932ce7ddcde140d89fcc4ed4315c7e;hb=b5a996ee217aea486eb78860fe7bab2b522f9678;hp=340d5bcd568e1759a98f210a5bad716a29eac15a;hpb=e3f35893d64112de70839da517c31e239a250b6a;p=swftools.git diff --git a/lib/gfxpoly/active.c b/lib/gfxpoly/active.c index 340d5bc..2904e08 100644 --- a/lib/gfxpoly/active.c +++ b/lib/gfxpoly/active.c @@ -32,7 +32,7 @@ void actlist_dump(actlist_t*a, int32_t y) fprintf(stderr, "[%d]", s->nr); s = s->right; if(s) fprintf(stderr, " "); - else fprintf(stderr, "\n"); + else fprintf(stderr, " y=%d\n", y); } } void actlist_verify(actlist_t*a, int32_t y) @@ -95,6 +95,7 @@ segment_t* actlist_find(actlist_t*a, point_t p1, point_t p2) //double d = cmp(t, p1, p2); double d = single_cmp(t, p1); if(d>=0 && to_the_left) { + actlist_dump(a, p1.y); segment_t*s = a->list; while(s) { fprintf(stderr, "[%d] %f/%f (%d,%d) -> (%d,%d)\n", s->nr, @@ -148,6 +149,7 @@ segment_t* actlist_find(actlist_t*a, point_t p1, point_t p2) } #endif + /* this can be optimized for (is not needed in) normal mode (as opposed to horizontal postprocess mode) */ segment_t*out = last; if(d<0 || (d==0 && LINE_EQ(p2,last)<0)) { last = last->left; @@ -373,7 +375,7 @@ static void move_to_root(actlist_t*a, segment_t*s) } } -static int actlist_splay(actlist_t*a, point_t p1, point_t p2) +static void actlist_splay(actlist_t*a, point_t p1, point_t p2) { if(!a->list) return;