From d21f73c498680ca10cb5e0c2c11f6ff90ec3f93f Mon Sep 17 00:00:00 2001 From: neoraider Date: Sat, 15 Sep 2007 21:22:05 +0000 Subject: zoomedit: Bug in der Grid-Funktion gefixt --- draw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'draw.c') diff --git a/draw.c b/draw.c index cb25a1e..b293e66 100644 --- a/draw.c +++ b/draw.c @@ -33,7 +33,7 @@ static void drawGrid(cairo_t *cr, const RECTANGLE *rect) { if(step > 0.005) { if(step > 0.5) - string = g_strdup_printf("%i", (int)d); + string = g_strdup_printf("%i", (int)rint(d)); else string = g_strdup_printf("%.*f", -(int)floor(log10(step*1.1)), d+step/10); @@ -50,7 +50,7 @@ static void drawGrid(cairo_t *cr, const RECTANGLE *rect) { if(step > 0.005) { if(step > 0.5) - string = g_strdup_printf("%i", (int)d); + string = g_strdup_printf("%i", (int)rint(d)); else string = g_strdup_printf("%.*f", -(int)floor(log10(step*1.1)), d+step/10); @@ -146,8 +146,9 @@ gboolean drawTopView(GtkWidget *widget, GdkEventExpose *event, gpointer data) { drawGrid(cr, &rect); for(i = 0; i < getLevel()->nRooms; i++) { - if(&getLevel()->rooms[i] != getActiveRoom()) + if(&getLevel()->rooms[i] != getActiveRoom()) { polygon2path(cr, &getLevel()->rooms[i].polygon, &rect, TRUE); + } } cairo_set_source_rgba(cr, 0.0, 0.7, 1.0, 0.3); -- cgit v1.2.3