| 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); gboolean champlain_bounding_box_covers (ChamplainBoundingBox *bbox,gdouble latitude,gdouble longitude);
struct ChamplainBoundingBox {
gdouble left;
gdouble top;
gdouble right;
gdouble bottom;
};
Defines the area of a ChamplainMapDataSource that contains data.
| left coordinate | |
| top coordinate | |
| right coordinate | |
| 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);
Gets the center's latitude and longitude of the box to latitude and longitude.
|
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 |
|
the latitude of the point |
|
the longitude of the point |
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
gboolean champlain_bounding_box_covers (ChamplainBoundingBox *bbox,gdouble latitude,gdouble longitude);
Checks whether bbox covers the given coordinates.
|
a ChamplainBoundingBox |
|
the latitude of the point |
|
the longitude of the point |
Returns : |
TRUE when the bounding box covers given coordinates, FALSE otherwise. |
Since 0.12.4