Verified Commit 39289458 authored by James Westman's avatar James Westman
Browse files

viewport: Remove zoom_in/zoom_out

Replaced by the ShumateMap methods.
parent 05d8561e
Pipeline #397020 passed with stages
in 3 minutes and 24 seconds
......@@ -433,41 +433,6 @@ shumate_viewport_get_min_zoom_level (ShumateViewport *self)
return self->min_zoom_level;
}
/**
* shumate_viewport_zoom_in:
* @self: a #ShumateViewport
*
* Increases the zoom level
*/
void shumate_viewport_zoom_in (ShumateViewport *self)
{
double zoom_level;
g_return_if_fail (SHUMATE_IS_VIEWPORT (self));
/* Round to the nearest 1/5 of a zoom level to prevent floating point
* error accumulation. */
zoom_level = roundf ((self->zoom_level + 0.2) * 5) / 5;
shumate_viewport_set_zoom_level (self, zoom_level);
}
/**
* shumate_viewport_zoom_out:
* @self: a #ShumateViewport
*
* Decreases the zoom level
*/
void shumate_viewport_zoom_out (ShumateViewport *self)
{
double zoom_level;
g_return_if_fail (SHUMATE_IS_VIEWPORT (self));
zoom_level = roundf ((self->zoom_level - 0.2) * 5) / 5;
shumate_viewport_set_zoom_level (self, zoom_level);
}
/**
* shumate_viewport_set_reference_map_source:
* @self: a #ShumateViewport
......
......@@ -49,9 +49,6 @@ void shumate_viewport_set_min_zoom_level (ShumateViewport *self,
guint min_zoom_level);
guint shumate_viewport_get_min_zoom_level (ShumateViewport *self);
void shumate_viewport_zoom_in (ShumateViewport *self);
void shumate_viewport_zoom_out (ShumateViewport *self);
void shumate_viewport_set_reference_map_source (ShumateViewport *self,
ShumateMapSource *map_source);
ShumateMapSource *shumate_viewport_get_reference_map_source (ShumateViewport *self);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment