From: Karryanna Date: Wed, 13 May 2015 21:52:27 +0000 (+0200) Subject: Labelling: Map parts generation doesn't round coordinates up X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=de98805f4b165f7c56e794b0a3066112f65351d4;p=leo.git Labelling: Map parts generation doesn't round coordinates up --- diff --git a/labeller.c b/labeller.c index 3171782..5348737 100644 --- a/labeller.c +++ b/labeller.c @@ -1457,9 +1457,11 @@ struct map_part **get_map_parts(struct placement *p) } int x_min = max2(0, p->x) / conf_map_part_width; - int x_max = min2(page_width_int, (p->x + v.width + conf_map_part_width - 1)) / conf_map_part_width; + // CHECK ME: Is rounding needed? + int x_max = min2(page_width_int, (p->x + v.width)) / conf_map_part_width; int y_min = max2(0, p->y) / conf_map_part_height; - int y_max = min2(page_height_int, (p->y + v.height + conf_map_part_height - 1)) / conf_map_part_height; + // CHECK ME: Is rounding needed? + int y_max = min2(page_height_int, (p->y + v.height)) / conf_map_part_height; if (dbg_map_parts) printf("Cells between [%d; %d] and [%d; %d] generated\n", x_min, y_min, x_max, y_max);