X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswfdraw.c;h=723b253dbd0b12c07eceb6094c882354c22c6c2d;hb=8bde8a660e6eb865d40511c6650ce9f69bb87ed7;hp=66dfc7f33d30aa1db8ce5928cf33c01efcf94db4;hpb=ebf53a918174ecce8bf0ff64fa69e12677e52bae;p=swftools.git diff --git a/lib/modules/swfdraw.c b/lib/modules/swfdraw.c index 66dfc7f..723b253 100644 --- a/lib/modules/swfdraw.c +++ b/lib/modules/swfdraw.c @@ -98,13 +98,22 @@ static void swf_ShapeDrawerMoveTo(drawer_t*draw, FPOINT * to) SWFSHAPEDRAWER*sdraw = (SWFSHAPEDRAWER*)draw->internal; int x = to->x*20; int y = to->y*20; - if(sdraw->lastx != x || sdraw->lasty != y) { + + /* we need to write moveto always- it + might be that it signals the end of a polygon, otherwise + we would end up connecting two polygons which should + be seperate + TODO: check if the last operation was a moveTo- if + yes we *can* skip it. + */ + + //if(sdraw->lastx != x || sdraw->lasty != y) { fixEndPoint(draw); swf_ShapeSetMove(sdraw->tag,sdraw->shape,x,y); sdraw->firstx = sdraw->lastx = x; sdraw->firsty = sdraw->lasty = y; draw->pos = *to; - } + //} } static void swf_ShapeDrawerLineTo(drawer_t*draw, FPOINT * to) { @@ -151,6 +160,8 @@ static void swf_ShapeDrawerSplineTo(drawer_t*draw, FPOINT * c1, FPOINT* to) static void swf_ShapeDrawerFinish(drawer_t*draw) { SWFSHAPEDRAWER*sdraw = (SWFSHAPEDRAWER*)draw->internal; + if(sdraw->isfinished) + return; fixEndPoint(draw);