summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);