[gimp] app: remove GimpPickable implementation from GimpImageMap
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove GimpPickable implementation from GimpImageMap
- Date: Fri, 17 May 2013 00:04:17 +0000 (UTC)
commit e3180de9603752f143920e238c6ab2717444ac6f
Author: Michael Natterer <mitch gimp org>
Date: Fri May 17 02:02:28 2013 +0200
app: remove GimpPickable implementation from GimpImageMap
It's not needed because we don't modify the drawable's
pixels any more.
app/core/gimpimagemap.c | 82 +++---------------------------------------
app/tools/gimpimagemaptool.c | 2 +-
2 files changed, 6 insertions(+), 78 deletions(-)
---
diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c
index b22091d..be9f882 100644
--- a/app/core/gimpimagemap.c
+++ b/app/core/gimpimagemap.c
@@ -46,8 +46,6 @@
#include "gimpimage.h"
#include "gimpimagemap.h"
#include "gimpmarshal.h"
-#include "gimppickable.h"
-#include "gimpviewable.h"
#include "gimpchannel.h"
#include "gimpprogress.h"
@@ -77,30 +75,15 @@ struct _GimpImageMap
};
-static void gimp_image_map_pickable_iface_init (GimpPickableInterface *iface);
+static void gimp_image_map_dispose (GObject *object);
+static void gimp_image_map_finalize (GObject *object);
-static void gimp_image_map_dispose (GObject *object);
-static void gimp_image_map_finalize (GObject *object);
+static gboolean gimp_image_map_add_filter (GimpImageMap *image_map);
+static gboolean gimp_image_map_remove_filter (GimpImageMap *image_map);
-static GimpImage * gimp_image_map_get_image (GimpPickable *pickable);
-static const Babl * gimp_image_map_get_format (GimpPickable *pickable);
-static const Babl * gimp_image_map_get_format_with_alpha
- (GimpPickable *pickable);
-static GeglBuffer * gimp_image_map_get_buffer (GimpPickable *pickable);
-static gboolean gimp_image_map_get_pixel_at (GimpPickable *pickable,
- gint x,
- gint y,
- const Babl *format,
- gpointer pixel);
-static gboolean gimp_image_map_add_filter (GimpImageMap *image_map);
-static gboolean gimp_image_map_remove_filter (GimpImageMap *image_map);
-
-
-G_DEFINE_TYPE_WITH_CODE (GimpImageMap, gimp_image_map, GIMP_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (GIMP_TYPE_PICKABLE,
- gimp_image_map_pickable_iface_init))
+G_DEFINE_TYPE (GimpImageMap, gimp_image_map, GIMP_TYPE_OBJECT)
#define parent_class gimp_image_map_parent_class
@@ -126,16 +109,6 @@ gimp_image_map_class_init (GimpImageMapClass *klass)
}
static void
-gimp_image_map_pickable_iface_init (GimpPickableInterface *iface)
-{
- iface->get_image = gimp_image_map_get_image;
- iface->get_format = gimp_image_map_get_format;
- iface->get_format_with_alpha = gimp_image_map_get_format_with_alpha;
- iface->get_buffer = gimp_image_map_get_buffer;
- iface->get_pixel_at = gimp_image_map_get_pixel_at;
-}
-
-static void
gimp_image_map_init (GimpImageMap *image_map)
{
}
@@ -195,51 +168,6 @@ gimp_image_map_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static GimpImage *
-gimp_image_map_get_image (GimpPickable *pickable)
-{
- GimpImageMap *image_map = GIMP_IMAGE_MAP (pickable);
-
- return gimp_pickable_get_image (GIMP_PICKABLE (image_map->drawable));
-}
-
-static const Babl *
-gimp_image_map_get_format (GimpPickable *pickable)
-{
- GimpImageMap *image_map = GIMP_IMAGE_MAP (pickable);
-
- return gimp_pickable_get_format (GIMP_PICKABLE (image_map->drawable));
-}
-
-static const Babl *
-gimp_image_map_get_format_with_alpha (GimpPickable *pickable)
-{
- GimpImageMap *image_map = GIMP_IMAGE_MAP (pickable);
-
- return gimp_pickable_get_format_with_alpha (GIMP_PICKABLE (image_map->drawable));
-}
-
-static GeglBuffer *
-gimp_image_map_get_buffer (GimpPickable *pickable)
-{
- GimpImageMap *image_map = GIMP_IMAGE_MAP (pickable);
-
- return gimp_pickable_get_buffer (GIMP_PICKABLE (image_map->drawable));
-}
-
-static gboolean
-gimp_image_map_get_pixel_at (GimpPickable *pickable,
- gint x,
- gint y,
- const Babl *format,
- gpointer pixel)
-{
- GimpImageMap *image_map = GIMP_IMAGE_MAP (pickable);
-
- return gimp_pickable_get_pixel_at (GIMP_PICKABLE (image_map->drawable),
- x, y, format, pixel);
-}
-
GimpImageMap *
gimp_image_map_new (GimpDrawable *drawable,
const gchar *undo_desc,
diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c
index fa71a34..3f41d68 100644
--- a/app/tools/gimpimagemaptool.c
+++ b/app/tools/gimpimagemaptool.c
@@ -559,7 +559,7 @@ gimp_image_map_tool_pick_color (GimpColorTool *color_tool,
*sample_format = gimp_drawable_get_format (tool->drawable);
- return gimp_pickable_pick_color (GIMP_PICKABLE (tool->image_map),
+ return gimp_pickable_pick_color (GIMP_PICKABLE (tool->drawable),
x - off_x,
y - off_y,
color_tool->options->sample_average,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]