![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct ChamplainBoundingBox; ChamplainBoundingBox * champlain_bounding_box_new (void
); ChamplainBoundingBox * champlain_bounding_box_copy (const ChamplainBoundingBox *bbox
); void champlain_bounding_box_free (ChamplainBoundingBox *bbox
); void champlain_bounding_box_get_center (ChamplainBoundingBox *bbox
,gdouble *latitude
,gdouble *longitude
); void champlain_bounding_box_compose (ChamplainBoundingBox *bbox
,ChamplainBoundingBox *other
); void champlain_bounding_box_extend (ChamplainBoundingBox *bbox
,gdouble latitude
,gdouble longitude
); gboolean champlain_bounding_box_is_valid (ChamplainBoundingBox *bbox
);
struct ChamplainBoundingBox { gdouble left; gdouble top; gdouble right; gdouble bottom; };
Defines the area of a ChamplainMapDataSource that contains data.
gdouble |
left coordinate |
gdouble |
top coordinate |
gdouble |
right coordinate |
gdouble |
bottom coordinate |
Since 0.6
ChamplainBoundingBox * champlain_bounding_box_new (void
);
Creates a newly allocated ChamplainBoundingBox to be freed
with champlain_bounding_box_free()
.
Returns : |
a ChamplainBoundingBox |
Since 0.6
ChamplainBoundingBox * champlain_bounding_box_copy (const ChamplainBoundingBox *bbox
);
Makes a copy of the bounding box structure. The result must be
freed using champlain_bounding_box_free()
.
|
a ChamplainBoundingBox |
Returns : |
an allocated copy of bbox . |
Since 0.6
void champlain_bounding_box_free (ChamplainBoundingBox *bbox
);
Frees a bounding box structure created with champlain_bounding_box_new()
or
champlain_bounding_box_copy()
.
|
a ChamplainBoundingBox |
Since 0.6
void champlain_bounding_box_get_center (ChamplainBoundingBox *bbox
,gdouble *latitude
,gdouble *longitude
);
Sets the latitude and longitude of the box to lat
and lon
.
|
a ChamplainBoundingBox |
|
the latitude of the box center. [out] |
|
the longitude of the box center. [out] |
Since 0.6
void champlain_bounding_box_compose (ChamplainBoundingBox *bbox
,ChamplainBoundingBox *other
);
Sets bbox equal to the bounding box containing both bbox
and other
.
|
a ChamplainBoundingBox |
|
a ChamplainBoundingBox |
Since 0.10
void champlain_bounding_box_extend (ChamplainBoundingBox *bbox
,gdouble latitude
,gdouble longitude
);
Extend the bounding box so it contains a point with latitude
and longitude
.
Do nothing if the point is already inside the bounding box.
|
a ChamplainBoundingBox |
|
latitude |
|
longitude |
Since 0.10
gboolean champlain_bounding_box_is_valid (ChamplainBoundingBox *bbox
);
Checks whether bbox represents a valid bounding box on the map.
|
a ChamplainBoundingBox |
Returns : |
TRUE when the bounding box is valid, FALSE otherwise. |
Since 0.10