X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_graph.c;h=33f0e516bf35279972358e5bed0fa76bba800111;hb=361a0fd38d7adf95847508f54c0bde9b3f98662e;hp=a258685a91bfb26ec1ffcd95f66dcc8f02592ea1;hpb=a669be0918d3b0427e6ce549c1877963ce046b95;p=rrdtool.git diff --git a/src/rrd_graph.c b/src/rrd_graph.c index a258685..33f0e51 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.6 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.8 Copyright by Tobi Oetiker, 1997-2005 **************************************************************************** * rrd__graph.c produce graphs from data in rrdfiles ****************************************************************************/ @@ -1991,39 +1991,32 @@ grid_paint(image_desc_t *im) if ( im->gdes[i].gf != GF_PRINT && im->gdes[i].gf != GF_GPRINT && im->gdes[i].gf != GF_COMMENT) { - int boxL, boxH, boxV; + int boxH, boxV; - boxL = gfx_get_text_width(im->canvas, 0, + boxH = gfx_get_text_width(im->canvas, 0, im->text_prop[TEXT_PROP_LEGEND].font, im->text_prop[TEXT_PROP_LEGEND].size, - im->tabwidth,"oo", 0); - boxH = boxL / 1.9; - boxV = boxH+1; + im->tabwidth,"o", 0) * 1.2; + boxV = boxH*1.1; - /* make sure transparent colors show up all the same */ + /* make sure transparent colors show up the same way as in the graph */ node = gfx_new_area(im->canvas, - X0-1,Y0-boxV, - X0-1,Y0+1, - X0+boxL+0.5,Y0+1, - im->graph_col[GRC_BACK]); - gfx_add_point ( node, X0+boxL+0.5, Y0-boxV ); - node = gfx_new_area(im->canvas, - X0-1,Y0-boxV, - X0-1,Y0, + X0,Y0-boxV, + X0,Y0, X0+boxH,Y0, - im->graph_col[GRC_CANVAS]); + im->graph_col[GRC_BACK]); gfx_add_point ( node, X0+boxH, Y0-boxV ); node = gfx_new_area(im->canvas, - X0-1,Y0-boxV, - X0-1,Y0, + X0,Y0-boxV, + X0,Y0, X0+boxH,Y0, im->gdes[i].col); gfx_add_point ( node, X0+boxH, Y0-boxV ); node = gfx_new_line(im->canvas, - X0-1,Y0-boxV, - X0-1,Y0, - 1,im->graph_col[GRC_FRAME]); + X0,Y0-boxV, + X0,Y0, + 1.0,im->graph_col[GRC_FRAME]); gfx_add_point(node,X0+boxH,Y0); gfx_add_point(node,X0+boxH,Y0-boxV); gfx_close_path(node); @@ -2928,6 +2921,7 @@ rrd_graph_options(int argc, char *argv[],image_desc_t *im) {"tabwidth", required_argument, 0, 'T'}, {"font-render-mode", required_argument, 0, 'R'}, {"font-smoothing-threshold", required_argument, 0, 'B'}, + {"alt-y-mrtg", no_argument, 0, 1000}, /* this has no effect it is just here to save old apps from crashing when they use it */ {0,0,0,0}}; int option_index = 0; int opt;