diff options
author | neoraider <devnull@localhost> | 2007-09-15 23:22:05 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-09-15 23:22:05 +0200 |
commit | d21f73c498680ca10cb5e0c2c11f6ff90ec3f93f (patch) | |
tree | 8a0e10d5b7611ac0842949e9b10251bf858d69fd | |
parent | 8dc800c37233bf64cbfe3b6a1eced0c9b7c46558 (diff) | |
download | zoomedit-d21f73c498680ca10cb5e0c2c11f6ff90ec3f93f.tar zoomedit-d21f73c498680ca10cb5e0c2c11f6ff90ec3f93f.zip |
zoomedit: Bug in der Grid-Funktion gefixt
-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); |