From 53866b1e56025606966ae99b09fe6fd9a6eda6b5 Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 6 May 2005 23:00:53 +0000 Subject: [PATCH] * added RRDTOOL/TOBI OETIKER back in * in riggid mode, cut data and 'min' and 'max' not two above * gibt ytop0 a default value git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@493 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_graph.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 597abaf..cbf947d 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -151,9 +151,9 @@ ytr(image_desc_t *im, double value){ if (! im->rigid) { /* keep yval as-is */ } else if (yval > im->yorigin) { - yval = im->yorigin+2; + yval = im->yorigin; } else if (yval < im->yorigin - im->ysize){ - yval = im->yorigin - im->ysize - 2; + yval = im->yorigin - im->ysize; } return yval; } @@ -1923,7 +1923,7 @@ grid_paint(image_desc_t *im) } else { res = draw_horizontal_grid(im); } - + /* dont draw horizontal grid if there is no min and max val */ if (! res ) { char *nodata = "No Data found"; @@ -1954,6 +1954,14 @@ grid_paint(image_desc_t *im) im->text_prop[TEXT_PROP_TITLE].size, im->tabwidth, 0.0, GFX_H_CENTER, GFX_V_CENTER, im->title); + /* rrdtool 'logo' */ + gfx_new_text( im->canvas, + im->ximg-7, 7, + 0xbfbfbfff, + im->text_prop[TEXT_PROP_AXIS].font, + 5, im->tabwidth, 270, + GFX_H_RIGHT, GFX_V_TOP, + "RRDTOOL / TOBI OETIKER"); /* graph labels */ if( !(im->extra_flags & NOLEGEND) & !(im->extra_flags & ONLY_GRAPH) ) { @@ -2484,7 +2492,7 @@ graph_paint(image_desc_t *im, char ***calcpr) } } else { - float ybase0 = DNAN,ytop0; + float 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 */ -- 2.30.2