X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxtools.c;h=082eefa11e90b2b2e116e4db0fe28e3c01d7b25a;hb=6f78b0ef3998e959ce09c5ef11d46149756b682b;hp=2527675f87f44981883c57ff5f10f1fee3363d59;hpb=5e60b81690ac5883abe4f68b61814b8764604fd1;p=swftools.git diff --git a/lib/gfxtools.c b/lib/gfxtools.c index 2527675..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) { @@ -656,6 +656,13 @@ gfxbbox_t gfxbbox_expand_to_point(gfxbbox_t box, gfxcoord_t x, gfxcoord_t y) return box; } +gfxbbox_t gfxbbox_expand_to_bbox(gfxbbox_t box, gfxbbox_t box2) +{ + box = gfxbbox_expand_to_point(box, box2.xmin, box2.ymin); + box = gfxbbox_expand_to_point(box, box2.xmax, box2.ymax); + return box; +} + void gfxbbox_intersect(gfxbbox_t*box1, gfxbbox_t*box2) { if(box2->xmin > box1->xmin) @@ -904,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; @@ -1047,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;