summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5cc1ed2)
raw | patch | inline | side by side (parent: 5cc1ed2)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 6 May 2007 19:38:22 +0000 (19:38 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 6 May 2007 19:38:22 +0000 (19:38 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@1055 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_graph.c | patch | blob | history |
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index 35978cf6c7077682c600079a009e77c376f05942..22439b5771f174ee0e885cacc28540b9c2d6286c 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
for (i = sgrid; i <= egrid; i++){
double Y0=ytr(im,im->ygrid_scale.gridstep*i);
double YN=ytr(im,im->ygrid_scale.gridstep*(i+1));
- if ( round(Y0) >= im->yorigin-im->ysize
- && round(Y0) <= im->yorigin){
+ if ( floor(Y0+0.5) >= im->yorigin-im->ysize
+ && floor(Y0+0.5) <= im->yorigin){
/* Make sure at least 2 grid labels are shown, even if it doesn't agree
with the chosen settings. Add a label if required by settings, or if
there is only one label so far and the next grid line is out of bounds. */
pre_value = value;
Y0 = ytr(im, value);
- if(round(Y0) <= im->yorigin - im->ysize) break;
+ if(floor(Y0+0.5) <= im->yorigin - im->ysize) break;
/* major grid line */
gfx_new_dashed_line ( im->canvas,
if(value < im->minval) continue;
Y0 = ytr(im, value);
- if(round(Y0) <= im->yorigin - im->ysize) break;
+ if(floor(Y0+0.5) <= im->yorigin - im->ysize) break;
/* draw lines */
gfx_new_dashed_line ( im->canvas,
if(value < im->minval) continue;
Y0 = ytr(im, value);
- if(round(Y0) <= im->yorigin - im->ysize) break;
+ if(floor(Y0+0.5) <= im->yorigin - im->ysize) break;
/* draw lines */
gfx_new_dashed_line ( im->canvas,
if(value < im->minval) continue;
Y0 = ytr(im, value);
- if(round(Y0) <= im->yorigin - im->ysize) break;
+ if(floor(Y0+0.5) <= im->yorigin - im->ysize) break;
/* draw lines */
gfx_new_dashed_line ( im->canvas,
if(value < im->minval) continue;
Y0 = ytr(im, value);
- if(round(Y0) <= im->yorigin - im->ysize) break;
+ if(floor(Y0+0.5) <= im->yorigin - im->ysize) break;
/* draw lines */
gfx_new_dashed_line ( im->canvas,