[gimp] app: make gimp_display_shell_scale_get_image_size_for_scale() private



commit b0ce294f8f309e1a00e453c2cc3148e8b3d2ff2f
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jan 5 18:36:37 2016 +0100

    app: make gimp_display_shell_scale_get_image_size_for_scale() private

 app/display/gimpdisplayshell-scale.c |   62 +++++++++++++++++-----------------
 app/display/gimpdisplayshell-scale.h |    4 --
 2 files changed, 31 insertions(+), 35 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-scale.c b/app/display/gimpdisplayshell-scale.c
index 9479c2d..e9b07e1 100644
--- a/app/display/gimpdisplayshell-scale.c
+++ b/app/display/gimpdisplayshell-scale.c
@@ -53,7 +53,13 @@ static void      gimp_display_shell_scale_get_screen_resolution
                                                          (GimpDisplayShell *shell,
                                                           gdouble          *xres,
                                                           gdouble          *yres);
-static void      gimp_display_shell_scale_to             (GimpDisplayShell *shell,
+static void      gimp_display_shell_scale_get_image_size_for_scale
+                                                         (GimpDisplayShell *shell,
+                                                          gdouble           scale,
+                                                          gint             *w,
+                                                          gint             *h);
+
+  static void    gimp_display_shell_scale_to             (GimpDisplayShell *shell,
                                                           gdouble           scale,
                                                           gdouble           viewport_x,
                                                           gdouble           viewport_y);
@@ -185,36 +191,6 @@ gimp_display_shell_scale_get_image_size (GimpDisplayShell *shell,
 }
 
 /**
- * gimp_display_shell_scale_get_image_size_for_scale:
- * @shell:
- * @scale:
- * @w:
- * @h:
- *
- **/
-void
-gimp_display_shell_scale_get_image_size_for_scale (GimpDisplayShell *shell,
-                                                   gdouble           scale,
-                                                   gint             *w,
-                                                   gint             *h)
-{
-  GimpImage *image;
-  gdouble    scale_x;
-  gdouble    scale_y;
-
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
-
-  image = gimp_display_get_image (shell->display);
-
-  g_return_if_fail (GIMP_IS_IMAGE (image));
-
-  gimp_display_shell_calculate_scale_x_and_y (shell, scale, &scale_x, &scale_y);
-
-  if (w) *w = scale_x * gimp_image_get_width  (image);
-  if (h) *h = scale_y * gimp_image_get_height (image);
-}
-
-/**
  * gimp_display_shell_scale:
  * @shell:     the #GimpDisplayShell
  * @zoom_type: whether to zoom in, our or to a specific scale
@@ -851,6 +827,30 @@ gimp_display_shell_scale_get_screen_resolution (GimpDisplayShell *shell,
 }
 
 /**
+ * gimp_display_shell_scale_get_image_size_for_scale:
+ * @shell:
+ * @scale:
+ * @w:
+ * @h:
+ *
+ **/
+static void
+gimp_display_shell_scale_get_image_size_for_scale (GimpDisplayShell *shell,
+                                                   gdouble           scale,
+                                                   gint             *w,
+                                                   gint             *h)
+{
+  GimpImage *image = gimp_display_get_image (shell->display);
+  gdouble    scale_x;
+  gdouble    scale_y;
+
+  gimp_display_shell_calculate_scale_x_and_y (shell, scale, &scale_x, &scale_y);
+
+  if (w) *w = scale_x * gimp_image_get_width  (image);
+  if (h) *h = scale_y * gimp_image_get_height (image);
+}
+
+/**
  * gimp_display_shell_scale_to:
  * @shell:
  * @scale:
diff --git a/app/display/gimpdisplayshell-scale.h b/app/display/gimpdisplayshell-scale.h
index 3594a2d..03a42f7 100644
--- a/app/display/gimpdisplayshell-scale.h
+++ b/app/display/gimpdisplayshell-scale.h
@@ -28,10 +28,6 @@ void     gimp_display_shell_scale_set_dot_for_dot          (GimpDisplayShell *sh
 void     gimp_display_shell_scale_get_image_size           (GimpDisplayShell *shell,
                                                             gint             *w,
                                                             gint             *h);
-void     gimp_display_shell_scale_get_image_size_for_scale (GimpDisplayShell *shell,
-                                                            gdouble           scale,
-                                                            gint             *w,
-                                                            gint             *h);
 
 void     gimp_display_shell_scale                          (GimpDisplayShell *shell,
                                                             GimpZoomType      zoom_type,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]