[gegl] bin: remove command zoom-fit-buffer



commit 48ad37de3fdb0c7dcc6bc446fa51e593e0516e84
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Jan 16 20:20:22 2019 +0100

    bin: remove command zoom-fit-buffer

 bin/ui.c | 23 -----------------------
 1 file changed, 23 deletions(-)
---
diff --git a/bin/ui.c b/bin/ui.c
index 7f10e63ca..e3e8e4461 100644
--- a/bin/ui.c
+++ b/bin/ui.c
@@ -3587,29 +3587,6 @@ static void center (State *o)
   mrg_queue_draw (mrg, NULL);
 }
 
-  int cmd_zoom_fit_buffer (COMMAND_ARGS);
-int cmd_zoom_fit_buffer (COMMAND_ARGS) /* "zoom-fit-buffer", 0, "", ""*/
-{
-  State *o = global_state;
-  Mrg *mrg = o->mrg;
-  GeglRectangle rect = *gegl_buffer_get_extent (o->buffer);
-  float scale, scale2;
-
-  scale = 1.0 * mrg_width (mrg) / rect.width;
-  scale2 = 1.0 * mrg_height (mrg) / rect.height;
-
-  if (scale2 < scale) scale = scale2;
-
-  o->scale = scale;
-  o->u = -(mrg_width (mrg) - rect.width * o->scale) / 2;
-  o->v = -(mrg_height (mrg) - rect.height * o->scale) / 2;
-  o->u += rect.x * o->scale;
-  o->v += rect.y * o->scale;
-
-  mrg_queue_draw (mrg, NULL);
-  return 0;
-}
-
 static void zoom_at (State *o, float screen_cx, float screen_cy, float factor)
 {
   float x, y;


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