Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libchamplain
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
GNOME
libchamplain
Commits
fd54b7cc
Commit
fd54b7cc
authored
Feb 03, 2011
by
Jiří Techet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swap elements in the BoundingBox structure and fix center computation
parent
31182412
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
champlain/champlain-bounding-box.c
champlain/champlain-bounding-box.c
+6
-6
champlain/champlain-bounding-box.h
champlain/champlain-bounding-box.h
+6
-6
champlain/champlain-memphis-renderer.c
champlain/champlain-memphis-renderer.c
+2
-2
No files found.
champlain/champlain-bounding-box.c
View file @
fd54b7cc
...
...
@@ -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
* @lat
itude
: (out): the latitude of the box center
* @lon
gitude
: (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
*
lat
itude
,
gdouble
*
lon
gitude
)
{
g_return_if_fail
(
CHAMPLAIN_BOUNDING_BOX
(
bbox
));
*
l
at
=
(
bbox
->
right
+
bbox
->
left
)
/
2
.
0
;
*
l
on
=
(
bbox
->
top
+
bbox
->
bottom
)
/
2
.
0
;
*
l
ongitude
=
(
bbox
->
right
+
bbox
->
left
)
/
2
.
0
;
*
l
atitude
=
(
bbox
->
top
+
bbox
->
bottom
)
/
2
.
0
;
}
champlain/champlain-bounding-box.h
View file @
fd54b7cc
...
...
@@ -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
*
lat
itude
,
gdouble
*
lon
gitude
);
G_END_DECLS
...
...
champlain/champlain-memphis-renderer.c
View file @
fd54b7cc
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment