[gimp/goat-invasion: 215/418] app: tile_manager_read_pixel_data_1() -> gegl_buffer_sample()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 215/418] app: tile_manager_read_pixel_data_1() -> gegl_buffer_sample()
- Date: Wed, 4 Apr 2012 10:43:52 +0000 (UTC)
commit bd81c10924ec8d7be0ba17f290e200348600885f
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]