From 6d4f4dced654c08997ff898821242f60a766cee5 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 14 Aug 2011 09:41:30 +0000 Subject: [PATCH] fix alignment of centered items ... title and footer git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4@2197 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index 341100c4..3af1942b 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -1850,7 +1850,7 @@ int leg_place( glue = 0; } if (prt_fctn == 'c') - leg_x = (double)(legendwidth - fill) / 2.0; + leg_x = border + (double)(legendwidth - fill) / 2.0; if (prt_fctn == 'r') leg_x = legendwidth - fill + border; for (ii = mark; ii <= i; ii++) { @@ -3135,7 +3135,7 @@ int graph_size_location( */ switch(im->legendposition){ case NORTH: - im->xOriginTitle = Xvertical + Xylabel + (im->xsize / 2); + im->xOriginTitle = (im->ximg / 2); im->yOriginTitle = 0; im->xOriginLegend = 0; @@ -3156,7 +3156,7 @@ int graph_size_location( break; case WEST: - im->xOriginTitle = im->legendwidth + Xvertical + Xylabel + im->xsize / 2; + im->xOriginTitle = im->legendwidth + im->xsize / 2; im->yOriginTitle = 0; im->xOriginLegend = 0; @@ -3177,7 +3177,7 @@ int graph_size_location( break; case SOUTH: - im->xOriginTitle = Xvertical + Xylabel + im->xsize / 2; + im->xOriginTitle = im->ximg / 2; im->yOriginTitle = 0; im->xOriginLegend = 0; @@ -3198,7 +3198,7 @@ int graph_size_location( break; case EAST: - im->xOriginTitle = Xvertical + Xylabel + im->xsize / 2; + im->xOriginTitle = im->xsize / 2; im->yOriginTitle = 0; im->xOriginLegend = Xvertical + Xylabel + Xmain + Xvertical2; -- 2.30.2