X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxpoly%2Frenderpoly.c;h=ca0ccc22cd713d696c0ea4f237d580bb8cdbe94c;hp=9e3c593e9005b2308dbc383d928182c96a520725;hb=f7e9e8a9616f1ecb26776369fda6807cf8821a68;hpb=47dfa706dc7d700ab587db9f8ac54999c5ffa506 diff --git a/lib/gfxpoly/renderpoly.c b/lib/gfxpoly/renderpoly.c index 9e3c593..ca0ccc2 100644 --- a/lib/gfxpoly/renderpoly.c +++ b/lib/gfxpoly/renderpoly.c @@ -120,7 +120,7 @@ static void fill_bitwise(unsigned char*line, int x1, int x2) } } -unsigned char* render_polygon(gfxpoly_t*polygon, intbbox_t*bbox, double zoom, windrule_t*rule) +unsigned char* render_polygon(gfxpoly_t*polygon, intbbox_t*bbox, double zoom, windrule_t*rule, windcontext_t*context) { renderbuf_t _buf, *buf=&_buf; buf->width = (bbox->xmax - bbox->xmin); @@ -153,7 +153,7 @@ unsigned char* render_polygon(gfxpoly_t*polygon, intbbox_t*bbox, double zoom, wi qsort(points, num, sizeof(renderpoint_t), compare_renderpoints); int lastx = 0; - windstate_t fill = rule->start(1); + windstate_t fill = rule->start(context); for(n=0;nx - bbox->xmin); @@ -166,7 +166,7 @@ unsigned char* render_polygon(gfxpoly_t*polygon, intbbox_t*bbox, double zoom, wi if(fill.is_filled && lastxadd(fill, p->fs, p->dir, p->polygon_nr); + fill = rule->add(context, fill, p->fs, p->dir, p->polygon_nr); lastx = x; } if(fill.is_filled && lastx!=buf->width) {