From c0ed1aa5ba0958edd23fb7a39706edb44545292a Mon Sep 17 00:00:00 2001 From: oetiker Date: Fri, 1 Jun 2007 17:59:25 +0000 Subject: [PATCH] --full-size-mode with and without --no-legend should work now -- Matthew Chambers git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1099 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index 191404e2..f9c7a114 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -2710,11 +2710,19 @@ int graph_size_location( ** of the legend and the axis labels. */ - /* Determine where to place the legends onto the image. - ** Set Ymain and adjust im->yorigin to match the space requirements. - */ - if (leg_place(im, &Ymain) == -1) - return -1; + if (im->extra_flags & NOLEGEND) + { + /* set dimensions correctly if using full size mode with no legend */ + im->yorigin = im->yimg - im->text_prop[TEXT_PROP_AXIS].size * 2.5 - Yspacing; + Ymain = im->yorigin; + } else + { + /* Determine where to place the legends onto the image. + ** Set Ymain and adjust im->yorigin to match the space requirements. + */ + if (leg_place(im, &Ymain) == -1) + return -1; + } #ifdef WITH_PIECHART /* if (im->yimg < Ypie) im->yimg = Ypie; * not sure what do about this */ -- 2.30.2