summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-09-15 23:22:05 +0200
committerneoraider <devnull@localhost>2007-09-15 23:22:05 +0200
commitd21f73c498680ca10cb5e0c2c11f6ff90ec3f93f (patch)
tree8a0e10d5b7611ac0842949e9b10251bf858d69fd
parent8dc800c37233bf64cbfe3b6a1eced0c9b7c46558 (diff)
downloadzoomedit-d21f73c498680ca10cb5e0c2c11f6ff90ec3f93f.tar
zoomedit-d21f73c498680ca10cb5e0c2c11f6ff90ec3f93f.zip
zoomedit: Bug in der Grid-Funktion gefixt
-rw-r--r--draw.c7
1 files changed, 4 insertions, 3 deletions
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);