From daf997992b637a2d7eec60a4e99b46d46c176fa9 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 3 Oct 2007 19:18:56 +0300 Subject: [PATCH] Output POI text even if we have an icon. --- src/map-poi.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/map-poi.c b/src/map-poi.c index ebb4ea3..d3852a6 100644 --- a/src/map-poi.c +++ b/src/map-poi.c @@ -132,17 +132,22 @@ while (SQLITE_ROW == sqlite3_step(poisql.select_poi)) { poix - _draw_width, poiy - _draw_width, (MAX_ZOOM-_zoom)/6 * _draw_width, (MAX_ZOOM-_zoom)/6 * _draw_width, 0, 360 * 64); - if (_zoom<3 && poi_label) { - map_poi_title(poix, poiy, poi_label); - } } else { + guint w,h; + w=gdk_pixbuf_get_width(pixbuf); + h=gdk_pixbuf_get_height(pixbuf); gdk_draw_pixbuf(_map_pixmap, _gc[COLORABLE_POI], pixbuf, 0, 0, - poix - gdk_pixbuf_get_width(pixbuf) / 2, - poiy - gdk_pixbuf_get_height(pixbuf) / 2, + poix-w/2, + poiy-h/2, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); + if (_zoom<2) + gdk_draw_rectangle(_map_pixmap, _gc[COLORABLE_POI], FALSE, poix-w/2-1, poiy-h/2-1, w+1, h+1); + } + if (_zoom<3 && poi_label) { + map_poi_title(poix, poiy, poi_label); } } sqlite3_reset(poisql.select_poi); -- 2.39.5