X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxtools.c;fp=lib%2Fgfxtools.c;h=9143507c21d6fbc55a5ca5c4f3f341808e9f1646;hp=0862fd6372803b2b4d4c8939c309a921b67828c4;hb=cfb7bd544f259200542b74152ff919595a9da86c;hpb=0c8078b9fa9e2273e4dee6356beccbc35a592a26 diff --git a/lib/gfxtools.c b/lib/gfxtools.c index 0862fd6..9143507 100644 --- a/lib/gfxtools.c +++ b/lib/gfxtools.c @@ -58,15 +58,14 @@ static void linedraw_moveTo(gfxdrawer_t*d, gfxcoord_t x, gfxcoord_t y) static void linedraw_lineTo(gfxdrawer_t*d, gfxcoord_t x, gfxcoord_t y) { linedraw_internal_t*i = (linedraw_internal_t*)d->internal; - gfxline_t*l = (gfxline_t*)rfx_alloc(sizeof(gfxline_t)); - if(!i->has_moveto) { /* starts with a line, not with a moveto. As this is the first entry in the list, this is probably *meant* to be a moveto */ linedraw_moveTo(d, x, y); return; } - + + gfxline_t*l = (gfxline_t*)rfx_alloc(sizeof(gfxline_t)); l->type = gfx_lineTo; d->x = l->x = x; d->y = l->y = y; @@ -81,13 +80,12 @@ static void linedraw_lineTo(gfxdrawer_t*d, gfxcoord_t x, gfxcoord_t y) static void linedraw_splineTo(gfxdrawer_t*d, gfxcoord_t sx, gfxcoord_t sy, gfxcoord_t x, gfxcoord_t y) { linedraw_internal_t*i = (linedraw_internal_t*)d->internal; - gfxline_t*l = (gfxline_t*)rfx_alloc(sizeof(gfxline_t)); - if(!i->has_moveto) { linedraw_moveTo(d, x, y); return; } + gfxline_t*l = (gfxline_t*)rfx_alloc(sizeof(gfxline_t)); l->type = gfx_splineTo; d->x = l->x = x; d->y = l->y = y;