X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_graph.c;h=3a39ae240c804e12665f2f33b8154aff1bf1a073;hb=598e1be5cb840ba33b6cbbd77d258a0805d5d1a6;hp=b53672fa05a4cb42c6fdfadb01bbd537c3278121;hpb=4e6fc7a224e3662bd282fefaa8aa5d2021072d7c;p=rrdtool.git diff --git a/src/rrd_graph.c b/src/rrd_graph.c index b53672f..3a39ae2 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.4 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.6 Copyright by Tobi Oetiker, 1997-2005 **************************************************************************** * rrd__graph.c produce graphs from data in rrdfiles ****************************************************************************/ @@ -2506,11 +2506,11 @@ graph_paint(image_desc_t *im, char ***calcpr) } } else { - float ybase0 = DNAN,ytop0=DNAN; + double ybase0 = DNAN,ytop0=DNAN; for(ii=0;iixsize;ii++){ /* keep things simple for now, just draw these bars do not try to build a big and complex area */ - float ybase,ytop; + double ybase,ytop; if ( im->slopemode == 0 && ii==0){ continue; } @@ -2531,7 +2531,7 @@ graph_paint(image_desc_t *im, char ***calcpr) /* every area has to be wound clock-wise, so we have to make sur base remains base */ if (ybase > ytop){ - float extra = ytop; + double extra = ytop; ytop = ybase; ybase = extra; } @@ -2541,13 +2541,13 @@ graph_paint(image_desc_t *im, char ***calcpr) } if ( !isnan(ybase0) ){ node = gfx_new_area(im->canvas, - ii-1+im->xorigin,ybase0, - ii-1+im->xorigin,ytop0, - ii+im->xorigin,ytop, + (double)ii-1.1+(double)im->xorigin,ybase0-0.1, + (double)ii-1.1+(double)im->xorigin,ytop0+0.1, + (double)ii+0.1+(double)im->xorigin,ytop+0.1, im->gdes[i].col ); gfx_add_point(node, - ii+im->xorigin,ybase + (double)ii+0.01+im->xorigin,ybase-0.1 ); } ybase0=ybase;