[gimp/goat-invasion: 215/412] app: tile_manager_read_pixel_data_1() -> gegl_buffer_sample()



commit c96e8143a10e6313b2a0a84f61b0d0333fa841dc
Author: Michael Natterer <mitch gimp org>
Date:   Thu Mar 22 16:41:53 2012 +0100

    app: tile_manager_read_pixel_data_1() -> gegl_buffer_sample()

 app/core/gimpimagemap.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c
index b6e27c3..d6b2ab5 100644
--- a/app/core/gimpimagemap.c
+++ b/app/core/gimpimagemap.c
@@ -337,10 +337,11 @@ gimp_image_map_get_pixel_at (GimpPickable *pickable,
           if (x >= offset_x && x < offset_x + width &&
               y >= offset_y && y < offset_y + height)
             {
-              tile_manager_read_pixel_data_1 (gimp_gegl_buffer_get_tiles (image_map->undo_buffer),
-                                              x - offset_x,
-                                              y - offset_y,
-                                              pixel);
+              gegl_buffer_sample (image_map->undo_buffer,
+                                  x - offset_x, y - offset_y,
+                                  NULL, pixel,
+                                  gimp_drawable_get_format (image_map->drawable),
+                                  GEGL_SAMPLER_NEAREST);
 
               return TRUE;
             }
@@ -349,10 +350,8 @@ gimp_image_map_get_pixel_at (GimpPickable *pickable,
       return gimp_pickable_get_pixel_at (GIMP_PICKABLE (image_map->drawable),
                                          x, y, pixel);
     }
-  else /* out of bounds error */
-    {
-      return FALSE;
-    }
+
+  return FALSE;
 }
 
 GimpImageMap *



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