[libchamplain] Fix Polygon displaying with zoom levels requiring an anchor
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libchamplain] Fix Polygon displaying with zoom levels requiring an anchor
- Date: Sat, 12 Sep 2009 21:57:58 +0000 (UTC)
commit 9a88e9a2195c76a131fe29ef974d7d4ba26a9f91
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Sat Sep 12 17:47:31 2009 -0400
Fix Polygon displaying with zoom levels requiring an anchor
champlain/champlain-view.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 6356bde..9477a9e 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -402,15 +402,15 @@ draw_polygon (ChamplainView *view, ChamplainPolygon *polygon)
while (list != NULL)
{
ChamplainPoint *point = (ChamplainPoint*) list->data;
- gint x, y;
+ gfloat x, y;
x = champlain_map_source_get_x (priv->map_source, priv->zoom_level,
point->lon);
y = champlain_map_source_get_y (priv->map_source, priv->zoom_level,
point->lat);
- x -= priv->viewport_size.x;
- y -= priv->viewport_size.y;
+ x -= priv->viewport_size.x + priv->anchor.x;
+ y -= priv->viewport_size.y + priv->anchor.y;
cairo_line_to (cr, x, y);
list = list->next;
@@ -2543,7 +2543,7 @@ view_update_polygons (ChamplainView *view)
{
ChamplainViewPrivate *priv = view->priv;
GList *polygons;
- gint x, y;
+ gfloat x, y;
if (priv->polygons == NULL)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]