[gimp] app: move the remaining 3 layer modes to layer-modes/
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: move the remaining 3 layer modes to layer-modes/
- Date: Wed, 11 Jan 2017 11:56:04 +0000 (UTC)
commit 8b5553cef6bab955ddba9195e3b3146dfef9acb4
Author: Michael Natterer <mitch gimp org>
Date: Wed Jan 11 12:55:13 2017 +0100
app: move the remaining 3 layer modes to layer-modes/
Not exactly sure if all are correct, but the file moving is almost
done now.
app/gegl/gimp-gegl-nodes.c | 6 +-
app/operations/Makefile.am | 7 --
app/operations/gimp-operations.c | 12 ++--
app/operations/gimplayermodefunctions.c | 12 ++--
app/operations/gimpoperationcolorerasemode.h | 61 ------------------
app/operations/gimpoperationreplacemode.h | 61 ------------------
app/operations/layer-modes/Makefile.am | 8 ++-
.../gimpoperationbehind.c} | 66 ++++++++++----------
app/operations/layer-modes/gimpoperationbehind.h | 62 ++++++++++++++++++
.../gimpoperationcolorerase.c} | 66 ++++++++++----------
.../gimpoperationcolorerase.h} | 35 +++++-----
.../gimpoperationreplace.c} | 66 ++++++++++----------
app/operations/layer-modes/gimpoperationreplace.h | 62 ++++++++++++++++++
13 files changed, 263 insertions(+), 261 deletions(-)
---
diff --git a/app/gegl/gimp-gegl-nodes.c b/app/gegl/gimp-gegl-nodes.c
index 62ffe94..0028762 100644
--- a/app/gegl/gimp-gegl-nodes.c
+++ b/app/gegl/gimp-gegl-nodes.c
@@ -159,7 +159,7 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
break;
case GIMP_LAYER_MODE_BEHIND:
- operation = "gimp:behind-mode";
+ operation = "gimp:behind";
break;
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
@@ -312,7 +312,7 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
break;
case GIMP_LAYER_MODE_COLOR_ERASE:
- operation = "gimp:color-erase-mode";
+ operation = "gimp:color-erase";
break;
case GIMP_LAYER_MODE_OVERLAY:
@@ -340,7 +340,7 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
break;
case GIMP_LAYER_MODE_REPLACE:
- operation = "gimp:replace-mode";
+ operation = "gimp:replace";
break;
case GIMP_LAYER_MODE_ANTI_ERASE:
diff --git a/app/operations/Makefile.am b/app/operations/Makefile.am
index 977ebd7..5125ad4 100644
--- a/app/operations/Makefile.am
+++ b/app/operations/Makefile.am
@@ -97,12 +97,5 @@ libappoperations_a_SOURCES = \
\
gimpoperationpointlayermode.c \
gimpoperationpointlayermode.h \
- gimpoperationbehindmode.c \
- gimpoperationbehindmode.h \
- gimpoperationcolorerasemode.c \
- gimpoperationcolorerasemode.h \
- gimpoperationreplacemode.c \
- gimpoperationreplacemode.h \
- \
gimplayermodefunctions.c \
gimplayermodefunctions.h
diff --git a/app/operations/gimp-operations.c b/app/operations/gimp-operations.c
index 444712c..87b1444 100644
--- a/app/operations/gimp-operations.c
+++ b/app/operations/gimp-operations.c
@@ -68,7 +68,7 @@
#include "gimpoperationpointlayermode.h"
#include "layer-modes/gimpoperationnormal.h"
#include "layer-modes/gimpoperationdissolve.h"
-#include "gimpoperationbehindmode.h"
+#include "layer-modes/gimpoperationbehind.h"
#include "layer-modes/gimpoperationmultiply.h"
#include "layer-modes-legacy/gimpoperationmultiplylegacy.h"
#include "layer-modes/gimpoperationscreen.h"
@@ -106,13 +106,13 @@
#include "layer-modes-legacy/gimpoperationgrainextractlegacy.h"
#include "layer-modes/gimpoperationgrainmerge.h"
#include "layer-modes-legacy/gimpoperationgrainmergelegacy.h"
-#include "gimpoperationcolorerasemode.h"
+#include "layer-modes/gimpoperationcolorerase.h"
#include "layer-modes/gimpoperationlchhue.h"
#include "layer-modes/gimpoperationlchchroma.h"
#include "layer-modes/gimpoperationlchcolor.h"
#include "layer-modes/gimpoperationlchlightness.h"
#include "layer-modes/gimpoperationerase.h"
-#include "gimpoperationreplacemode.h"
+#include "layer-modes/gimpoperationreplace.h"
#include "layer-modes/gimpoperationantierase.h"
@@ -150,7 +150,7 @@ gimp_operations_init (void)
g_type_class_ref (GIMP_TYPE_OPERATION_POINT_LAYER_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_NORMAL);
g_type_class_ref (GIMP_TYPE_OPERATION_DISSOLVE);
- g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND);
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY);
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN);
@@ -188,13 +188,13 @@ gimp_operations_init (void)
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE);
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE_LEGACY);
- g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_HUE);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_CHROMA);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_COLOR);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_LIGHTNESS);
g_type_class_ref (GIMP_TYPE_OPERATION_ERASE);
- g_type_class_ref (GIMP_TYPE_OPERATION_REPLACE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_REPLACE);
g_type_class_ref (GIMP_TYPE_OPERATION_ANTI_ERASE);
gimp_gegl_config_register ("gimp:brightness-contrast",
diff --git a/app/operations/gimplayermodefunctions.c b/app/operations/gimplayermodefunctions.c
index 7f07bd1..ccb0235 100644
--- a/app/operations/gimplayermodefunctions.c
+++ b/app/operations/gimplayermodefunctions.c
@@ -28,7 +28,7 @@
#include "layer-modes/gimpoperationnormal.h"
#include "layer-modes/gimpoperationdissolve.h"
-#include "gimpoperationbehindmode.h"
+#include "layer-modes/gimpoperationbehind.h"
#include "layer-modes/gimpoperationmultiply.h"
#include "layer-modes-legacy/gimpoperationmultiplylegacy.h"
#include "layer-modes/gimpoperationscreen.h"
@@ -66,13 +66,13 @@
#include "layer-modes-legacy/gimpoperationgrainextractlegacy.h"
#include "layer-modes/gimpoperationgrainmerge.h"
#include "layer-modes-legacy/gimpoperationgrainmergelegacy.h"
-#include "gimpoperationcolorerasemode.h"
+#include "layer-modes/gimpoperationcolorerase.h"
#include "layer-modes/gimpoperationlchhue.h"
#include "layer-modes/gimpoperationlchchroma.h"
#include "layer-modes/gimpoperationlchcolor.h"
#include "layer-modes/gimpoperationlchlightness.h"
#include "layer-modes/gimpoperationerase.h"
-#include "gimpoperationreplacemode.h"
+#include "layer-modes/gimpoperationreplace.h"
#include "layer-modes/gimpoperationantierase.h"
@@ -93,7 +93,7 @@ get_layer_mode_function (GimpLayerMode paint_mode,
break;
case GIMP_LAYER_MODE_BEHIND:
- func = gimp_operation_behind_mode_process_pixels;
+ func = gimp_operation_behind_process_pixels;
break;
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
@@ -245,7 +245,7 @@ get_layer_mode_function (GimpLayerMode paint_mode,
break;
case GIMP_LAYER_MODE_COLOR_ERASE:
- func = gimp_operation_color_erase_mode_process_pixels;
+ func = gimp_operation_color_erase_process_pixels;
break;
case GIMP_LAYER_MODE_OVERLAY:
@@ -281,7 +281,7 @@ get_layer_mode_function (GimpLayerMode paint_mode,
break;
case GIMP_LAYER_MODE_REPLACE:
- func = gimp_operation_replace_mode_process_pixels;
+ func = gimp_operation_replace_process_pixels;
break;
case GIMP_LAYER_MODE_ANTI_ERASE:
diff --git a/app/operations/layer-modes/Makefile.am b/app/operations/layer-modes/Makefile.am
index 9e0d04a..c7547ba 100644
--- a/app/operations/layer-modes/Makefile.am
+++ b/app/operations/layer-modes/Makefile.am
@@ -72,7 +72,13 @@ libapplayermodes_generic_a_sources = \
gimpoperationgrainextract.c \
gimpoperationgrainextract.h \
gimpoperationgrainmerge.c \
- gimpoperationgrainmerge.h
+ gimpoperationgrainmerge.h \
+ gimpoperationbehind.c \
+ gimpoperationbehind.h \
+ gimpoperationcolorerase.c \
+ gimpoperationcolorerase.h \
+ gimpoperationreplace.c \
+ gimpoperationreplace.h
libapplayermodes_sse2_a_sources = \
gimpoperationnormal-sse2.c
diff --git a/app/operations/gimpoperationbehindmode.c b/app/operations/layer-modes/gimpoperationbehind.c
similarity index 50%
rename from app/operations/gimpoperationbehindmode.c
rename to app/operations/layer-modes/gimpoperationbehind.c
index 719753d..332c73a 100644
--- a/app/operations/gimpoperationbehindmode.c
+++ b/app/operations/layer-modes/gimpoperationbehind.c
@@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
- * gimpoperationbehindmode.c
+ * gimpoperationbehind.c
* Copyright (C) 2008 Michael Natterer <mitch gimp org>
* 2012 Ville Sokk <ville sokk gmail com>
*
@@ -23,27 +23,27 @@
#include <gegl-plugin.h>
-#include "operations-types.h"
+#include "../operations-types.h"
-#include "gimpoperationbehindmode.h"
+#include "gimpoperationbehind.h"
-static gboolean gimp_operation_behind_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
+static gboolean gimp_operation_behind_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
-G_DEFINE_TYPE (GimpOperationBehindMode, gimp_operation_behind_mode,
+G_DEFINE_TYPE (GimpOperationBehind, gimp_operation_behind,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
static void
-gimp_operation_behind_mode_class_init (GimpOperationBehindModeClass *klass)
+gimp_operation_behind_class_init (GimpOperationBehindClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@@ -52,42 +52,42 @@ gimp_operation_behind_mode_class_init (GimpOperationBehindModeClass *klass)
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
gegl_operation_class_set_keys (operation_class,
- "name", "gimp:behind-mode",
+ "name", "gimp:behind",
"description", "GIMP behind mode operation",
NULL);
- point_class->process = gimp_operation_behind_mode_process;
+ point_class->process = gimp_operation_behind_process;
}
static void
-gimp_operation_behind_mode_init (GimpOperationBehindMode *self)
+gimp_operation_behind_init (GimpOperationBehind *self)
{
}
static gboolean
-gimp_operation_behind_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_behind_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
- return gimp_operation_behind_mode_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples,
roi, level);
+ return gimp_operation_behind_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi,
level);
}
gboolean
-gimp_operation_behind_mode_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_behind_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
const gboolean has_mask = mask != NULL;
diff --git a/app/operations/layer-modes/gimpoperationbehind.h
b/app/operations/layer-modes/gimpoperationbehind.h
new file mode 100644
index 0000000..cccc068
--- /dev/null
+++ b/app/operations/layer-modes/gimpoperationbehind.h
@@ -0,0 +1,62 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationbehind.h
+ * Copyright (C) 2008 Michael Natterer <mitch gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_OPERATION_BEHIND_H__
+#define __GIMP_OPERATION_BEHIND_H__
+
+
+#include "../gimpoperationpointlayermode.h"
+
+
+#define GIMP_TYPE_OPERATION_BEHIND (gimp_operation_behind_get_type ())
+#define GIMP_OPERATION_BEHIND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_BEHIND, GimpOperationBehind))
+#define GIMP_OPERATION_BEHIND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIMP_TYPE_OPERATION_BEHIND, GimpOperationBehindClass))
+#define GIMP_IS_OPERATION_BEHIND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIMP_TYPE_OPERATION_BEHIND))
+#define GIMP_IS_OPERATION_BEHIND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIMP_TYPE_OPERATION_BEHIND))
+#define GIMP_OPERATION_BEHIND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_OPERATION_BEHIND, GimpOperationBehindClass))
+
+
+typedef struct _GimpOperationBehind GimpOperationBehind;
+typedef struct _GimpOperationBehindClass GimpOperationBehindClass;
+
+struct _GimpOperationBehind
+{
+ GimpOperationPointLayerMode parent_instance;
+};
+
+struct _GimpOperationBehindClass
+{
+ GimpOperationPointLayerModeClass parent_class;
+};
+
+
+GType gimp_operation_behind_get_type (void) G_GNUC_CONST;
+
+gboolean gimp_operation_behind_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+
+#endif /* __GIMP_OPERATION_BEHIND_H__ */
diff --git a/app/operations/gimpoperationcolorerasemode.c
b/app/operations/layer-modes/gimpoperationcolorerase.c
similarity index 62%
rename from app/operations/gimpoperationcolorerasemode.c
rename to app/operations/layer-modes/gimpoperationcolorerase.c
index e9295f5..04e7533 100644
--- a/app/operations/gimpoperationcolorerasemode.c
+++ b/app/operations/layer-modes/gimpoperationcolorerase.c
@@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
- * gimpoperationcolorerasemode.c
+ * gimpoperationcolorerase.c
* Copyright (C) 2008 Michael Natterer <mitch gimp org>
* 2012 Ville Sokk <ville sokk gmail com>
*
@@ -27,27 +27,27 @@
#include "libgimpcolor/gimpcolor.h"
-#include "operations-types.h"
+#include "../operations-types.h"
-#include "gimpoperationcolorerasemode.h"
+#include "gimpoperationcolorerase.h"
-static gboolean gimp_operation_color_erase_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
+static gboolean gimp_operation_color_erase_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
-G_DEFINE_TYPE (GimpOperationColorEraseMode, gimp_operation_color_erase_mode,
+G_DEFINE_TYPE (GimpOperationColorErase, gimp_operation_color_erase,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
static void
-gimp_operation_color_erase_mode_class_init (GimpOperationColorEraseModeClass *klass)
+gimp_operation_color_erase_class_init (GimpOperationColorEraseClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@@ -56,42 +56,42 @@ gimp_operation_color_erase_mode_class_init (GimpOperationColorEraseModeClass *kl
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
gegl_operation_class_set_keys (operation_class,
- "name", "gimp:color-erase-mode",
+ "name", "gimp:color-erase",
"description", "GIMP color erase mode operation",
NULL);
- point_class->process = gimp_operation_color_erase_mode_process;
+ point_class->process = gimp_operation_color_erase_process;
}
static void
-gimp_operation_color_erase_mode_init (GimpOperationColorEraseMode *self)
+gimp_operation_color_erase_init (GimpOperationColorErase *self)
{
}
static gboolean
-gimp_operation_color_erase_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_color_erase_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
- return gimp_operation_color_erase_mode_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity,
samples, roi, level);
+ return gimp_operation_color_erase_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples,
roi, level);
}
gboolean
-gimp_operation_color_erase_mode_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_color_erase_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
const gboolean has_mask = mask != NULL;
diff --git a/app/operations/gimpoperationbehindmode.h b/app/operations/layer-modes/gimpoperationcolorerase.h
similarity index 53%
rename from app/operations/gimpoperationbehindmode.h
rename to app/operations/layer-modes/gimpoperationcolorerase.h
index 82e7d86..bdc70c1 100644
--- a/app/operations/gimpoperationbehindmode.h
+++ b/app/operations/layer-modes/gimpoperationcolorerase.h
@@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
- * gimpoperationbehindmode.h
+ * gimpoperationcolor_erase.h
* Copyright (C) 2008 Michael Natterer <mitch gimp org>
*
* This program is free software: you can redistribute it and/or modify
@@ -18,38 +18,38 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GIMP_OPERATION_BEHIND_MODE_H__
-#define __GIMP_OPERATION_BEHIND_MODE_H__
+#ifndef __GIMP_OPERATION_COLOR_ERASE_H__
+#define __GIMP_OPERATION_COLOR_ERASE_H__
-#include "gimpoperationpointlayermode.h"
+#include "../gimpoperationpointlayermode.h"
-#define GIMP_TYPE_OPERATION_BEHIND_MODE (gimp_operation_behind_mode_get_type ())
-#define GIMP_OPERATION_BEHIND_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_BEHIND_MODE, GimpOperationBehindMode))
-#define GIMP_OPERATION_BEHIND_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIMP_TYPE_OPERATION_BEHIND_MODE, GimpOperationBehindModeClass))
-#define GIMP_IS_OPERATION_BEHIND_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIMP_TYPE_OPERATION_BEHIND_MODE))
-#define GIMP_IS_OPERATION_BEHIND_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIMP_TYPE_OPERATION_BEHIND_MODE))
-#define GIMP_OPERATION_BEHIND_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_OPERATION_BEHIND_MODE, GimpOperationBehindModeClass))
+#define GIMP_TYPE_OPERATION_COLOR_ERASE (gimp_operation_color_erase_get_type ())
+#define GIMP_OPERATION_COLOR_ERASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_COLOR_ERASE, GimpOperationColorErase))
+#define GIMP_OPERATION_COLOR_ERASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIMP_TYPE_OPERATION_COLOR_ERASE, GimpOperationColorEraseClass))
+#define GIMP_IS_OPERATION_COLOR_ERASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIMP_TYPE_OPERATION_COLOR_ERASE))
+#define GIMP_IS_OPERATION_COLOR_ERASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIMP_TYPE_OPERATION_COLOR_ERASE))
+#define GIMP_OPERATION_COLOR_ERASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_OPERATION_COLOR_ERASE, GimpOperationColorEraseClass))
-typedef struct _GimpOperationBehindMode GimpOperationBehindMode;
-typedef struct _GimpOperationBehindModeClass GimpOperationBehindModeClass;
+typedef struct _GimpOperationColorErase GimpOperationColorErase;
+typedef struct _GimpOperationColorEraseClass GimpOperationColorEraseClass;
-struct _GimpOperationBehindMode
+struct _GimpOperationColorErase
{
GimpOperationPointLayerMode parent_instance;
};
-struct _GimpOperationBehindModeClass
+struct _GimpOperationColorEraseClass
{
GimpOperationPointLayerModeClass parent_class;
};
-GType gimp_operation_behind_mode_get_type (void) G_GNUC_CONST;
+GType gimp_operation_color_erase_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_behind_mode_process_pixels (gfloat *in,
+gboolean gimp_operation_color_erase_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
@@ -58,4 +58,5 @@ gboolean gimp_operation_behind_mode_process_pixels (gfloat *in,
const GeglRectangle *roi,
gint level);
-#endif /* __GIMP_OPERATION_BEHIND_MODE_H__ */
+
+#endif /* __GIMP_OPERATION_COLOR_ERASE_H__ */
diff --git a/app/operations/gimpoperationreplacemode.c b/app/operations/layer-modes/gimpoperationreplace.c
similarity index 51%
rename from app/operations/gimpoperationreplacemode.c
rename to app/operations/layer-modes/gimpoperationreplace.c
index 46d7dbb..122d647 100644
--- a/app/operations/gimpoperationreplacemode.c
+++ b/app/operations/layer-modes/gimpoperationreplace.c
@@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
- * gimpoperationreplacemode.c
+ * gimpoperationreplace.c
* Copyright (C) 2008 Michael Natterer <mitch gimp org>
*
* This program is free software: you can redistribute it and/or modify
@@ -22,27 +22,27 @@
#include <gegl-plugin.h>
-#include "operations-types.h"
+#include "../operations-types.h"
-#include "gimpoperationreplacemode.h"
+#include "gimpoperationreplace.h"
-static gboolean gimp_operation_replace_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
+static gboolean gimp_operation_replace_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
-G_DEFINE_TYPE (GimpOperationReplaceMode, gimp_operation_replace_mode,
+G_DEFINE_TYPE (GimpOperationReplace, gimp_operation_replace,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
static void
-gimp_operation_replace_mode_class_init (GimpOperationReplaceModeClass *klass)
+gimp_operation_replace_class_init (GimpOperationReplaceClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@@ -51,42 +51,42 @@ gimp_operation_replace_mode_class_init (GimpOperationReplaceModeClass *klass)
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
gegl_operation_class_set_keys (operation_class,
- "name", "gimp:replace-mode",
+ "name", "gimp:replace",
"description", "GIMP replace mode operation",
NULL);
- point_class->process = gimp_operation_replace_mode_process;
+ point_class->process = gimp_operation_replace_process;
}
static void
-gimp_operation_replace_mode_init (GimpOperationReplaceMode *self)
+gimp_operation_replace_init (GimpOperationReplace *self)
{
}
static gboolean
-gimp_operation_replace_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_replace_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
- return gimp_operation_replace_mode_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples,
roi, level);
+ return gimp_operation_replace_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi,
level);
}
gboolean
-gimp_operation_replace_mode_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_replace_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
const gboolean has_mask = mask != NULL;
diff --git a/app/operations/layer-modes/gimpoperationreplace.h
b/app/operations/layer-modes/gimpoperationreplace.h
new file mode 100644
index 0000000..f5712b1
--- /dev/null
+++ b/app/operations/layer-modes/gimpoperationreplace.h
@@ -0,0 +1,62 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationreplace.h
+ * Copyright (C) 2008 Michael Natterer <mitch gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_OPERATION_REPLACE_H__
+#define __GIMP_OPERATION_REPLACE_H__
+
+
+#include "../gimpoperationpointlayermode.h"
+
+
+#define GIMP_TYPE_OPERATION_REPLACE (gimp_operation_replace_get_type ())
+#define GIMP_OPERATION_REPLACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_REPLACE, GimpOperationReplace))
+#define GIMP_OPERATION_REPLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIMP_TYPE_OPERATION_REPLACE, GimpOperationReplaceClass))
+#define GIMP_IS_OPERATION_REPLACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIMP_TYPE_OPERATION_REPLACE))
+#define GIMP_IS_OPERATION_REPLACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIMP_TYPE_OPERATION_REPLACE))
+#define GIMP_OPERATION_REPLACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_OPERATION_REPLACE, GimpOperationReplaceClass))
+
+
+typedef struct _GimpOperationReplace GimpOperationReplace;
+typedef struct _GimpOperationReplaceClass GimpOperationReplaceClass;
+
+struct _GimpOperationReplace
+{
+ GimpOperationPointLayerMode parent_instance;
+};
+
+struct _GimpOperationReplaceClass
+{
+ GimpOperationPointLayerModeClass parent_class;
+};
+
+
+GType gimp_operation_replace_get_type (void) G_GNUC_CONST;
+
+gboolean gimp_operation_replace_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+
+#endif /* __GIMP_OPERATION_REPLACE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]