diff options
-rw-r--r-- | draw.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); |