[gimp/goat-invasion: 257/608] app: ask the buffer not the tile manager for its size



commit 0b6e23d0fc4977c24e3250317bd78a9cb89518c4
Author: Michael Natterer <mitch gimp org>
Date:   Mon Mar 26 01:42:43 2012 +0200

    app: ask the buffer not the tile manager for its size

 app/display/gimpdisplayshell-draw.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c
index 2a47978..6e0e971 100644
--- a/app/display/gimpdisplayshell-draw.c
+++ b/app/display/gimpdisplayshell-draw.c
@@ -27,10 +27,9 @@
 
 #include "display-types.h"
 
-#include "base/tile-manager.h"
-
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
+#include "core/gimppickable.h"
 #include "core/gimpprojection.h"
 
 #include "widgets/gimpcairo.h"
@@ -87,7 +86,7 @@ gimp_display_shell_draw_get_scaled_image_size_for_scale (GimpDisplayShell *shell
 {
   GimpImage      *image;
   GimpProjection *proj;
-  TileManager    *tiles;
+  GeglBuffer     *buffer;
   gdouble         scale_x;
   gdouble         scale_y;
 
@@ -101,10 +100,10 @@ gimp_display_shell_draw_get_scaled_image_size_for_scale (GimpDisplayShell *shell
 
   gimp_display_shell_calculate_scale_x_and_y (shell, scale, &scale_x, &scale_y);
 
-  tiles = gimp_projection_get_tiles_at_level (proj, 0, NULL);
+  buffer = gimp_pickable_get_buffer (GIMP_PICKABLE (proj));
 
-  if (w) *w = scale_x * tile_manager_width (tiles);
-  if (h) *h = scale_y * tile_manager_height (tiles);
+  if (w) *w = scale_x * gegl_buffer_get_width (buffer);
+  if (h) *h = scale_y * gegl_buffer_get_height (buffer);
 }
 
 void



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