[gnome-maps/wip/jonasdn/vector-tiles] Adjust text properly



commit 8cdb1ec9a29c37642713d1578d4673a1c5c730fc
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Mon May 4 22:17:45 2015 +0200

    Adjust text properly

 lib/maps-mapbox-text-layer.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/maps-mapbox-text-layer.c b/lib/maps-mapbox-text-layer.c
index 8c6d107..027c250 100644
--- a/lib/maps-mapbox-text-layer.c
+++ b/lib/maps-mapbox-text-layer.c
@@ -89,7 +89,9 @@ on_text_draw (ClutterCanvas *canvas,
   cairo_paint (cr);
   cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
 
-  cairo_set_source_surface (cr, text->surface, 0, 0);
+  cairo_set_source_surface (cr, text->surface,
+                            -text->surface_offset_x,
+                            -text->surface_offset_y);
   cairo_paint (cr);
   surface = cairo_get_target (cr);
   g_signal_handlers_disconnect_by_func (canvas, on_text_draw, text);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]