diff options
Diffstat (limited to 'draw.c')
-rw-r--r-- | draw.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -97,7 +97,7 @@ gboolean drawTopView(GtkWidget *widget, GdkEventExpose *event, gpointer data) { int i; - if(getLevel() == NULL) return; + if(getLevel() == NULL) return FALSE; if(pixmap == NULL || lastImageWidth != getImageWidth() || lastImageHeight != getImageHeight() || lastWidth != widget->allocation.width || lastHeight != widget->allocation.height || repaint) @@ -148,7 +148,7 @@ gboolean drawTopView(GtkWidget *widget, GdkEventExpose *event, gpointer data) { cairo_fill_preserve(cr); cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 0.9); - cairo_set_line_width(cr, 1.5/scale); + cairo_set_line_width(cr, 2.0/scale); cairo_stroke(cr); } @@ -157,6 +157,23 @@ gboolean drawTopView(GtkWidget *widget, GdkEventExpose *event, gpointer data) { gdk_draw_drawable(GDK_DRAWABLE(widget->window), widget->style->fg_gc[GTK_WIDGET_STATE(widget)], GDK_DRAWABLE(pixmap), 0, 0, 0, 0, -1, -1); + if(getHoveredRoom() != NULL && getHoveredRoom() != getActiveRoom()) { + cr = gdk_cairo_create(GDK_DRAWABLE(widget->window)); + + cairo_translate(cr, getImageWidth()/2-xTranslate, getImageHeight()/2-yTranslate); + cairo_scale(cr, scale, scale); + + cairo_set_line_width(cr, 2.0/scale); + cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); + + room2path(cr, getHoveredRoom(), NULL); + + cairo_set_source_rgba(cr, 0.0, 0.7, 1.0, 0.7); + cairo_stroke(cr); + + cairo_destroy (cr); + } + return FALSE; } |