[libshumate] viewport: Remove zoom_in/zoom_out
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libshumate] viewport: Remove zoom_in/zoom_out
- Date: Wed, 11 May 2022 20:00:40 +0000 (UTC)
commit 39289458aa59b5f85a0bcdf52a4d3d1bf7653bbd
Author: James Westman <james jwestman net>
Date: Tue Apr 26 12:19:16 2022 -0500
viewport: Remove zoom_in/zoom_out
Replaced by the ShumateMap methods.
shumate/shumate-viewport.c | 35 -----------------------------------
shumate/shumate-viewport.h | 3 ---
2 files changed, 38 deletions(-)
---
diff --git a/shumate/shumate-viewport.c b/shumate/shumate-viewport.c
index ce8a06f..fdb7458 100644
--- a/shumate/shumate-viewport.c
+++ b/shumate/shumate-viewport.c
@@ -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
diff --git a/shumate/shumate-viewport.h b/shumate/shumate-viewport.h
index 90cc0e2..b23db2e 100644
--- a/shumate/shumate-viewport.h
+++ b/shumate/shumate-viewport.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]