[libchamplain] Swap elements in the BoundingBox structure and fix center computation



commit fd54b7cc99e0776af6ab922ded3d7280f6807a4e
Author: JiÅ?í Techet <techet gmail com>
Date:   Thu Feb 3 00:17:09 2011 +0100

    Swap elements in the BoundingBox structure and fix center computation

 champlain/champlain-bounding-box.c     |   12 ++++++------
 champlain/champlain-bounding-box.h     |   12 ++++++------
 champlain/champlain-memphis-renderer.c |    4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/champlain/champlain-bounding-box.c b/champlain/champlain-bounding-box.c
index decb55c..43302e3 100644
--- a/champlain/champlain-bounding-box.c
+++ b/champlain/champlain-bounding-box.c
@@ -106,8 +106,8 @@ champlain_bounding_box_free (ChamplainBoundingBox *bbox)
 /**
  * champlain_bounding_box_get_center:
  * @bbox: a #ChamplainBoundingBox
- * @lat: (out): the latitude of the box center
- * @lon: (out): the longitude of the box center
+ * @latitude: (out): the latitude of the box center
+ * @longitude: (out): the longitude of the box center
  *
  * Sets the latitude and longitude of the box to @lat and @lon.
  *
@@ -115,11 +115,11 @@ champlain_bounding_box_free (ChamplainBoundingBox *bbox)
  */
 void
 champlain_bounding_box_get_center (ChamplainBoundingBox *bbox,
-    gdouble *lat,
-    gdouble *lon)
+    gdouble *latitude,
+    gdouble *longitude)
 {
   g_return_if_fail (CHAMPLAIN_BOUNDING_BOX (bbox));
 
-  *lat = (bbox->right + bbox->left) / 2.0;
-  *lon = (bbox->top + bbox->bottom) / 2.0;
+  *longitude = (bbox->right + bbox->left) / 2.0;
+  *latitude = (bbox->top + bbox->bottom) / 2.0;
 }
diff --git a/champlain/champlain-bounding-box.h b/champlain/champlain-bounding-box.h
index 7d97bc5..f79bf48 100644
--- a/champlain/champlain-bounding-box.h
+++ b/champlain/champlain-bounding-box.h
@@ -34,9 +34,9 @@ typedef struct _ChamplainBoundingBox ChamplainBoundingBox;
 /**
  * ChamplainBoundingBox:
  * @left: left coordinate
- * @bottom: bottom coordinate
- * @right: right coordinate
  * @top: top coordinate
+ * @right: right coordinate
+ * @bottom: bottom coordinate
  *
  * Defines the area of a ChamplainMapDataSource that contains data.
  *
@@ -45,9 +45,9 @@ typedef struct _ChamplainBoundingBox ChamplainBoundingBox;
 struct _ChamplainBoundingBox
 {
   gdouble left;
-  gdouble bottom;
-  gdouble right;
   gdouble top;
+  gdouble right;
+  gdouble bottom;
 };
 
 GType champlain_bounding_box_get_type (void) G_GNUC_CONST;
@@ -60,8 +60,8 @@ ChamplainBoundingBox *champlain_bounding_box_copy (const ChamplainBoundingBox *b
 void champlain_bounding_box_free (ChamplainBoundingBox *bbox);
 
 void champlain_bounding_box_get_center (ChamplainBoundingBox *bbox,
-    gdouble *lat,
-    gdouble *lon);
+    gdouble *latitude,
+    gdouble *longitude);
 
 G_END_DECLS
 
diff --git a/champlain/champlain-memphis-renderer.c b/champlain/champlain-memphis-renderer.c
index 99f80bf..99f04c4 100644
--- a/champlain/champlain-memphis-renderer.c
+++ b/champlain/champlain-memphis-renderer.c
@@ -466,8 +466,8 @@ set_data (ChamplainRenderer *renderer,
 
   bbox = champlain_bounding_box_new ();
 
-  memphis_map_get_bounding_box (map, &bbox->left, &bbox->top,
-      &bbox->right, &bbox->bottom);
+  memphis_map_get_bounding_box (map, &bbox->bottom, &bbox->left, &bbox->top,
+      &bbox->right);
   g_object_set (G_OBJECT (renderer), "bounding-box", bbox, NULL);
   champlain_bounding_box_free (bbox);
 }



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