From f674f884ea6fa52a86724d12247dc5add4bbee96 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 5 Aug 2008 19:03:23 +0000 Subject: [PATCH] fix (hopefully) rounding error causing -ve coords --- lib/common/shapes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 5f3473b62..aded3533f 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -2159,10 +2159,11 @@ static void record_init(node_t * n) sz.y = MAX(info->size.y, sz.y); } resize_reclbl(info, sz, mapbool(late_string(n, N_nojustify, "false"))); - ul = pointof(-sz.x / 2, sz.y / 2); + ul = pointof(-sz.x / 2, sz.y / 2); /* suspected to introduce ronding error - see Kluge below */ pos_reclbl(info, ul, sides); ND_width(n) = PS2INCH(info->size.x); - ND_height(n) = PS2INCH(info->size.y); + ND_height(n) = PS2INCH(info->size.y + 1); /* Kluge!! +1 to fix rounding diff between layout and rendering + otherwise we can get -1 coords in output */ ND_shape_info(n) = (void *) info; } -- 2.40.0