X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxtools.c;h=082eefa11e90b2b2e116e4db0fe28e3c01d7b25a;hp=f6853daff5caa667b665277df2342cbc6d29b7de;hb=d7367b3ec772ea163ebca6b7497639a0cb45c20c;hpb=395359a0831639fcc30aab4ea897e23ff8ab420c diff --git a/lib/gfxtools.c b/lib/gfxtools.c index f6853da..082eefa 100644 --- a/lib/gfxtools.c +++ b/lib/gfxtools.c @@ -205,8 +205,8 @@ static double get_spline_len(qspline_abc_t*s) void gfxtool_draw_dashed_line(gfxdrawer_t*d, gfxline_t*line, float*r, float phase) { double x=0,y=0; - double linepos,nextpos; - char on; + double linepos = 0,nextpos = 0; + char on = 0; int apos=0; if(line && line->type != gfx_moveTo) { @@ -658,8 +658,8 @@ gfxbbox_t gfxbbox_expand_to_point(gfxbbox_t box, gfxcoord_t x, gfxcoord_t y) gfxbbox_t gfxbbox_expand_to_bbox(gfxbbox_t box, gfxbbox_t box2) { - gfxbbox_expand_to_point(box, box2.xmin, box2.ymin); - gfxbbox_expand_to_point(box, box2.xmax, box2.ymax); + box = gfxbbox_expand_to_point(box, box2.xmin, box2.ymin); + box = gfxbbox_expand_to_point(box, box2.xmax, box2.ymax); return box; } @@ -911,7 +911,7 @@ gfxbbox_t* gfxline_isrectangle(gfxline_t*_l) gfxline_t*l = gfxline_clone(_l); gfxline_optimize(l); - double x1,x2,y1,y2; + double x1=0,x2=0,y1=0,y2=0; int xc=0,yc=0; char corners=0; @@ -1054,6 +1054,7 @@ gfxline_t* gfxline_restitch(gfxline_t*line) gfxpoint_t xy = {line->x, line->y}; dict_put(rev, &xy, prev); line->next = 0; + prev=0; } } line = next;