gimp r27239 - in trunk: . app/gegl
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27239 - in trunk: . app/gegl
- Date: Sat, 11 Oct 2008 17:20:21 +0000 (UTC)
Author: mitch
Date: Sat Oct 11 17:20:20 2008
New Revision: 27239
URL: http://svn.gnome.org/viewvc/gimp?rev=27239&view=rev
Log:
2008-10-11 Michael Natterer <mitch gimp org>
* app/gegl/gimpoperationpointcomposer.[ch]: add an empty abstract
GeglOperationPointComposer subclass which can be used to hook in
common debug or test or whatever code for below layer modes.
* app/gegl/gimpoperation*mode.[ch]: add empty stubs of layer mode
operations which do nothing but copying input to output.
* app/gegl/Makefile.am
* app/gegl/gegl-types.h: add them here and reordered things a bit.
* app/gegl/gimp-gegl.c (gimp_gegl_init): register the new
operations.
* app/gegl/gimp-gegl-utils.c (gimp_layer_mode_to_gegl_operation):
return the new operations.
Added:
trunk/app/gegl/gimpoperationadditionmode.c
trunk/app/gegl/gimpoperationadditionmode.h
trunk/app/gegl/gimpoperationantierasemode.c
trunk/app/gegl/gimpoperationantierasemode.h
trunk/app/gegl/gimpoperationbehindmode.c
trunk/app/gegl/gimpoperationbehindmode.h
trunk/app/gegl/gimpoperationburnmode.c
trunk/app/gegl/gimpoperationburnmode.h
trunk/app/gegl/gimpoperationcolorerasemode.c
trunk/app/gegl/gimpoperationcolorerasemode.h
trunk/app/gegl/gimpoperationcolormode.c
trunk/app/gegl/gimpoperationcolormode.h
trunk/app/gegl/gimpoperationdarkenonlymode.c
trunk/app/gegl/gimpoperationdarkenonlymode.h
trunk/app/gegl/gimpoperationdifferencemode.c
trunk/app/gegl/gimpoperationdifferencemode.h
trunk/app/gegl/gimpoperationdissolvemode.c
trunk/app/gegl/gimpoperationdissolvemode.h
trunk/app/gegl/gimpoperationdividemode.c
trunk/app/gegl/gimpoperationdividemode.h
trunk/app/gegl/gimpoperationdodgemode.c
trunk/app/gegl/gimpoperationdodgemode.h
trunk/app/gegl/gimpoperationerasemode.c
trunk/app/gegl/gimpoperationerasemode.h
trunk/app/gegl/gimpoperationgrainextractmode.c
trunk/app/gegl/gimpoperationgrainextractmode.h
trunk/app/gegl/gimpoperationgrainmergemode.c
trunk/app/gegl/gimpoperationgrainmergemode.h
trunk/app/gegl/gimpoperationhardlightmode.c
trunk/app/gegl/gimpoperationhardlightmode.h
trunk/app/gegl/gimpoperationhuemode.c
trunk/app/gegl/gimpoperationhuemode.h
trunk/app/gegl/gimpoperationlightenonlymode.c
trunk/app/gegl/gimpoperationlightenonlymode.h
trunk/app/gegl/gimpoperationmode.c
trunk/app/gegl/gimpoperationmode.h
trunk/app/gegl/gimpoperationmultiplymode.c
trunk/app/gegl/gimpoperationmultiplymode.h
trunk/app/gegl/gimpoperationoverlaymode.c
trunk/app/gegl/gimpoperationoverlaymode.h
trunk/app/gegl/gimpoperationpointcomposer.c
trunk/app/gegl/gimpoperationpointcomposer.h
trunk/app/gegl/gimpoperationreplacemode.c
trunk/app/gegl/gimpoperationreplacemode.h
trunk/app/gegl/gimpoperationsaturationmode.c
trunk/app/gegl/gimpoperationsaturationmode.h
trunk/app/gegl/gimpoperationscreenmode.c
trunk/app/gegl/gimpoperationscreenmode.h
trunk/app/gegl/gimpoperationsoftlightmode.c
trunk/app/gegl/gimpoperationsoftlightmode.h
trunk/app/gegl/gimpoperationsubtractmode.c
trunk/app/gegl/gimpoperationsubtractmode.h
trunk/app/gegl/gimpoperationvaluemode.c
trunk/app/gegl/gimpoperationvaluemode.h
Modified:
trunk/ChangeLog
trunk/app/gegl/Makefile.am
trunk/app/gegl/gegl-types.h
trunk/app/gegl/gimp-gegl-utils.c
trunk/app/gegl/gimp-gegl.c
Modified: trunk/app/gegl/Makefile.am
==============================================================================
--- trunk/app/gegl/Makefile.am (original)
+++ trunk/app/gegl/Makefile.am Sat Oct 11 17:20:20 2008
@@ -40,6 +40,13 @@
gimpthresholdconfig.c \
gimpthresholdconfig.h \
\
+ gimpoperationtilesink.c \
+ gimpoperationtilesink.h \
+ gimpoperationtilesource.c \
+ gimpoperationtilesource.h \
+ \
+ gimpoperationpointfilter.c \
+ gimpoperationpointfilter.h \
gimpoperationcolorbalance.c \
gimpoperationcolorbalance.h \
gimpoperationcolorize.c \
@@ -52,13 +59,60 @@
gimpoperationhuesaturation.h \
gimpoperationlevels.c \
gimpoperationlevels.h \
- gimpoperationpointfilter.c \
- gimpoperationpointfilter.h \
gimpoperationposterize.c \
gimpoperationposterize.h \
gimpoperationthreshold.c \
gimpoperationthreshold.h \
- gimpoperationtilesink.c \
- gimpoperationtilesink.h \
- gimpoperationtilesource.c \
- gimpoperationtilesource.h
+ \
+ gimpoperationpointcomposer.c \
+ gimpoperationpointcomposer.h \
+ gimpoperationdissolvemode.c \
+ gimpoperationdissolvemode.h \
+ gimpoperationbehindmode.c \
+ gimpoperationbehindmode.h \
+ gimpoperationmultiplymode.c \
+ gimpoperationmultiplymode.h \
+ gimpoperationscreenmode.c \
+ gimpoperationscreenmode.h \
+ gimpoperationoverlaymode.c \
+ gimpoperationoverlaymode.h \
+ gimpoperationdifferencemode.c \
+ gimpoperationdifferencemode.h \
+ gimpoperationadditionmode.c \
+ gimpoperationadditionmode.h \
+ gimpoperationsubtractmode.c \
+ gimpoperationsubtractmode.h \
+ gimpoperationdarkenonlymode.c \
+ gimpoperationdarkenonlymode.h \
+ gimpoperationlightenonlymode.c \
+ gimpoperationlightenonlymode.h \
+ gimpoperationhuemode.c \
+ gimpoperationhuemode.h \
+ gimpoperationsaturationmode.c \
+ gimpoperationsaturationmode.h \
+ gimpoperationcolormode.c \
+ gimpoperationcolormode.h \
+ gimpoperationvaluemode.c \
+ gimpoperationvaluemode.h \
+ gimpoperationdividemode.c \
+ gimpoperationdividemode.h \
+ gimpoperationdodgemode.c \
+ gimpoperationdodgemode.h \
+ gimpoperationburnmode.c \
+ gimpoperationburnmode.h \
+ gimpoperationhardlightmode.c \
+ gimpoperationhardlightmode.h \
+ gimpoperationsoftlightmode.c \
+ gimpoperationsoftlightmode.h \
+ gimpoperationgrainextractmode.c \
+ gimpoperationgrainextractmode.h \
+ gimpoperationgrainmergemode.c \
+ gimpoperationgrainmergemode.h \
+ gimpoperationcolorerasemode.c \
+ gimpoperationcolorerasemode.h \
+ gimpoperationerasemode.c \
+ gimpoperationerasemode.h \
+ gimpoperationreplacemode.c \
+ gimpoperationreplacemode.h \
+ gimpoperationantierasemode.c \
+ gimpoperationantierasemode.h
Modified: trunk/app/gegl/gegl-types.h
==============================================================================
--- trunk/app/gegl/gegl-types.h (original)
+++ trunk/app/gegl/gegl-types.h Sat Oct 11 17:20:20 2008
@@ -27,30 +27,58 @@
/* operations */
-typedef struct _GimpOperationColorBalance GimpOperationColorBalance;
-typedef struct _GimpOperationColorize GimpOperationColorize;
-typedef struct _GimpOperationCurves GimpOperationCurves;
-typedef struct _GimpOperationDesaturate GimpOperationDesaturate;
-typedef struct _GimpOperationHueSaturation GimpOperationHueSaturation;
-typedef struct _GimpOperationLevels GimpOperationLevels;
-typedef struct _GimpOperationPointFilter GimpOperationPointFilter;
-typedef struct _GimpOperationPosterize GimpOperationPosterize;
-typedef struct _GimpOperationThreshold GimpOperationThreshold;
-typedef struct _GimpOperationTileSink GimpOperationTileSink;
-typedef struct _GimpOperationTileSource GimpOperationTileSource;
+typedef struct _GimpOperationTileSink GimpOperationTileSink;
+typedef struct _GimpOperationTileSource GimpOperationTileSource;
+
+typedef struct _GimpOperationPointFilter GimpOperationPointFilter;
+typedef struct _GimpOperationColorBalance GimpOperationColorBalance;
+typedef struct _GimpOperationColorize GimpOperationColorize;
+typedef struct _GimpOperationCurves GimpOperationCurves;
+typedef struct _GimpOperationDesaturate GimpOperationDesaturate;
+typedef struct _GimpOperationHueSaturation GimpOperationHueSaturation;
+typedef struct _GimpOperationLevels GimpOperationLevels;
+typedef struct _GimpOperationPosterize GimpOperationPosterize;
+typedef struct _GimpOperationThreshold GimpOperationThreshold;
+
+typedef struct _GimpOperationPointComposer GimpOperationPointComposer;
+typedef struct _GimpOperationDissolveMode GimpOperationDissolveMode;
+typedef struct _GimpOperationBehindMode GimpOperationBehindMode;
+typedef struct _GimpOperationMultiplyMode GimpOperationMultiplyMode;
+typedef struct _GimpOperationScreenMode GimpOperationScreenMode;
+typedef struct _GimpOperationOverlayMode GimpOperationOverlayMode;
+typedef struct _GimpOperationDifferenceMode GimpOperationDifferenceMode;
+typedef struct _GimpOperationAdditionMode GimpOperationAdditionMode;
+typedef struct _GimpOperationSubtractMode GimpOperationSubtractMode;
+typedef struct _GimpOperationDarkenOnlyMode GimpOperationDarkenOnlyMode;
+typedef struct _GimpOperationLightenOnlyMode GimpOperationLightenOnlyMode;
+typedef struct _GimpOperationHueMode GimpOperationHueMode;
+typedef struct _GimpOperationSaturationMode GimpOperationSaturationMode;
+typedef struct _GimpOperationColorMode GimpOperationColorMode;
+typedef struct _GimpOperationValueMode GimpOperationValueMode;
+typedef struct _GimpOperationDivideMode GimpOperationDivideMode;
+typedef struct _GimpOperationDodgeMode GimpOperationDodgeMode;
+typedef struct _GimpOperationBurnMode GimpOperationBurnMode;
+typedef struct _GimpOperationHardlightMode GimpOperationHardlightMode;
+typedef struct _GimpOperationSoftlightMode GimpOperationSoftlightMode;
+typedef struct _GimpOperationGrainExtractMode GimpOperationGrainExtractMode;
+typedef struct _GimpOperationGrainMergeMode GimpOperationGrainMergeMode;
+typedef struct _GimpOperationColorEraseMode GimpOperationColorEraseMode;
+typedef struct _GimpOperationEraseMode GimpOperationEraseMode;
+typedef struct _GimpOperationReplaceMode GimpOperationReplaceMode;
+typedef struct _GimpOperationAntiEraseMode GimpOperationAntiEraseMode;
/* operation config objects */
-typedef struct _GimpBrightnessContrastConfig GimpBrightnessContrastConfig;
-typedef struct _GimpColorBalanceConfig GimpColorBalanceConfig;
-typedef struct _GimpColorizeConfig GimpColorizeConfig;
-typedef struct _GimpCurvesConfig GimpCurvesConfig;
-typedef struct _GimpDesaturateConfig GimpDesaturateConfig;
-typedef struct _GimpHueSaturationConfig GimpHueSaturationConfig;
-typedef struct _GimpLevelsConfig GimpLevelsConfig;
-typedef struct _GimpPosterizeConfig GimpPosterizeConfig;
-typedef struct _GimpThresholdConfig GimpThresholdConfig;
+typedef struct _GimpBrightnessContrastConfig GimpBrightnessContrastConfig;
+typedef struct _GimpColorBalanceConfig GimpColorBalanceConfig;
+typedef struct _GimpColorizeConfig GimpColorizeConfig;
+typedef struct _GimpCurvesConfig GimpCurvesConfig;
+typedef struct _GimpDesaturateConfig GimpDesaturateConfig;
+typedef struct _GimpHueSaturationConfig GimpHueSaturationConfig;
+typedef struct _GimpLevelsConfig GimpLevelsConfig;
+typedef struct _GimpPosterizeConfig GimpPosterizeConfig;
+typedef struct _GimpThresholdConfig GimpThresholdConfig;
#endif /* __GEGL_TYPES_H__ */
Modified: trunk/app/gegl/gimp-gegl-utils.c
==============================================================================
--- trunk/app/gegl/gimp-gegl-utils.c (original)
+++ trunk/app/gegl/gimp-gegl-utils.c Sat Oct 11 17:20:20 2008
@@ -96,28 +96,28 @@
switch (mode)
{
case GIMP_NORMAL_MODE: return "normal";
- case GIMP_DISSOLVE_MODE: return "normal"; /* "gimp-dissolve-mode" */
- case GIMP_BEHIND_MODE: return "normal"; /* "gimp-behind-mode" */
- case GIMP_MULTIPLY_MODE: return "normal"; /* "gimp-multiply-mode" */
- case GIMP_SCREEN_MODE: return "normal"; /* "gimp-screen_mode" */
- case GIMP_OVERLAY_MODE: return "normal"; /* "gimp-overlay-mode" */
- case GIMP_DIFFERENCE_MODE: return "normal"; /* "gimp-difference-mode" */
- case GIMP_ADDITION_MODE: return "normal"; /* "gimp-addition-mode" */
- case GIMP_SUBTRACT_MODE: return "normal"; /* "gimp-subtract-mode" */
- case GIMP_DARKEN_ONLY_MODE: return "normal"; /* "gimp-darken-mode" */
- case GIMP_LIGHTEN_ONLY_MODE: return "normal"; /* "gimp-lighten-mode" */
- case GIMP_HUE_MODE: return "normal"; /* "gimp-hue-mode" */
- case GIMP_SATURATION_MODE: return "normal"; /* "gimp-saturation-mode" */
- case GIMP_COLOR_MODE: return "normal"; /* "gimp-color-mode" */
- case GIMP_VALUE_MODE: return "normal"; /* "gimp-value-mode" */
- case GIMP_DIVIDE_MODE: return "normal"; /* "gimp-divide-mode" */
- case GIMP_DODGE_MODE: return "normal"; /* "gimp-dodge-mode" */
- case GIMP_BURN_MODE: return "normal"; /* "gimp-burn-mode" */
- case GIMP_HARDLIGHT_MODE: return "normal"; /* "gimp-hardlight-mode" */
- case GIMP_SOFTLIGHT_MODE: return "normal"; /* "gimp-softlight-mode" */
- case GIMP_GRAIN_EXTRACT_MODE: return "normal"; /* "gimp-grain-extract-mode" */
- case GIMP_GRAIN_MERGE_MODE: return "normal"; /* "gimp-grain-merge-mode" */
- case GIMP_COLOR_ERASE_MODE: return "normal"; /* "gimp-color-erase-mode" */
+ case GIMP_DISSOLVE_MODE: return "gimp-dissolve-mode";
+ case GIMP_BEHIND_MODE: return "gimp-behind-mode";
+ case GIMP_MULTIPLY_MODE: return "gimp-multiply-mode";
+ case GIMP_SCREEN_MODE: return "gimp-screen_mode";
+ case GIMP_OVERLAY_MODE: return "gimp-overlay-mode";
+ case GIMP_DIFFERENCE_MODE: return "gimp-difference-mode";
+ case GIMP_ADDITION_MODE: return "gimp-addition-mode";
+ case GIMP_SUBTRACT_MODE: return "gimp-subtract-mode";
+ case GIMP_DARKEN_ONLY_MODE: return "gimp-darken-mode";
+ case GIMP_LIGHTEN_ONLY_MODE: return "gimp-lighten-mode";
+ case GIMP_HUE_MODE: return "gimp-hue-mode";
+ case GIMP_SATURATION_MODE: return "gimp-saturation-mode";
+ case GIMP_COLOR_MODE: return "gimp-color-mode";
+ case GIMP_VALUE_MODE: return "gimp-value-mode";
+ case GIMP_DIVIDE_MODE: return "gimp-divide-mode";
+ case GIMP_DODGE_MODE: return "gimp-dodge-mode";
+ case GIMP_BURN_MODE: return "gimp-burn-mode";
+ case GIMP_HARDLIGHT_MODE: return "gimp-hardlight-mode";
+ case GIMP_SOFTLIGHT_MODE: return "gimp-softlight-mode";
+ case GIMP_GRAIN_EXTRACT_MODE: return "gimp-grain-extract-mode";
+ case GIMP_GRAIN_MERGE_MODE: return "gimp-grain-merge-mode";
+ case GIMP_COLOR_ERASE_MODE: return "gimp-color-erase-mode";
default:
break;
}
Modified: trunk/app/gegl/gimp-gegl.c
==============================================================================
--- trunk/app/gegl/gimp-gegl.c (original)
+++ trunk/app/gegl/gimp-gegl.c Sat Oct 11 17:20:20 2008
@@ -39,6 +39,32 @@
#include "gimpoperationtilesink.h"
#include "gimpoperationtilesource.h"
+#include "gimpoperationdissolvemode.h"
+#include "gimpoperationbehindmode.h"
+#include "gimpoperationmultiplymode.h"
+#include "gimpoperationscreenmode.h"
+#include "gimpoperationoverlaymode.h"
+#include "gimpoperationdifferencemode.h"
+#include "gimpoperationadditionmode.h"
+#include "gimpoperationsubtractmode.h"
+#include "gimpoperationdarkenonlymode.h"
+#include "gimpoperationlightenonlymode.h"
+#include "gimpoperationhuemode.h"
+#include "gimpoperationsaturationmode.h"
+#include "gimpoperationcolormode.h"
+#include "gimpoperationvaluemode.h"
+#include "gimpoperationdividemode.h"
+#include "gimpoperationdodgemode.h"
+#include "gimpoperationburnmode.h"
+#include "gimpoperationhardlightmode.h"
+#include "gimpoperationsoftlightmode.h"
+#include "gimpoperationgrainextractmode.h"
+#include "gimpoperationgrainmergemode.h"
+#include "gimpoperationcolorerasemode.h"
+#include "gimpoperationerasemode.h"
+#include "gimpoperationreplacemode.h"
+#include "gimpoperationantierasemode.h"
+
void
gimp_gegl_init (void)
@@ -48,6 +74,9 @@
"tile-height", TILE_HEIGHT,
NULL);
+ g_type_class_ref (GIMP_TYPE_OPERATION_TILE_SINK);
+ g_type_class_ref (GIMP_TYPE_OPERATION_TILE_SOURCE);
+
g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_BALANCE);
g_type_class_ref (GIMP_TYPE_OPERATION_COLORIZE);
g_type_class_ref (GIMP_TYPE_OPERATION_CURVES);
@@ -56,6 +85,30 @@
g_type_class_ref (GIMP_TYPE_OPERATION_LEVELS);
g_type_class_ref (GIMP_TYPE_OPERATION_POSTERIZE);
g_type_class_ref (GIMP_TYPE_OPERATION_THRESHOLD);
- g_type_class_ref (GIMP_TYPE_OPERATION_TILE_SINK);
- g_type_class_ref (GIMP_TYPE_OPERATION_TILE_SOURCE);
+
+ g_type_class_ref (GIMP_TYPE_OPERATION_DISSOLVE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_OVERLAY_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_HUE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_SATURATION_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_VALUE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_DODGE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_BURN_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_ERASE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_REPLACE_MODE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_ANTI_ERASE_MODE);
}
Added: trunk/app/gegl/gimpoperationadditionmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationadditionmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationadditionmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationadditionmode.h"
+
+
+static gboolean gimp_operation_addition_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationAdditionMode, gimp_operation_addition_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_addition_mode_class_init (GimpOperationAdditionModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-addition-mode";
+ operation_class->description = "GIMP addition mode operation";
+
+ point_class->process = gimp_operation_addition_mode_process;
+}
+
+static void
+gimp_operation_addition_mode_init (GimpOperationAdditionMode *self)
+{
+}
+
+static gboolean
+gimp_operation_addition_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationadditionmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationadditionmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationadditionmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_ADDITION_MODE_H__
+#define __GIMP_OPERATION_ADDITION_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_ADDITION_MODE (gimp_operation_addition_mode_get_type ())
+#define GIMP_OPERATION_ADDITION_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_ADDITION_MODE, GimpOperationAdditionMode))
+#define GIMP_OPERATION_ADDITION_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_ADDITION_MODE, GimpOperationAdditionModeClass))
+#define GIMP_IS_OPERATION_ADDITION_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_ADDITION_MODE))
+#define GIMP_IS_OPERATION_ADDITION_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_ADDITION_MODE))
+#define GIMP_OPERATION_ADDITION_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_ADDITION_MODE, GimpOperationAdditionModeClass))
+
+
+typedef struct _GimpOperationAdditionModeClass GimpOperationAdditionModeClass;
+
+struct _GimpOperationAdditionMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationAdditionModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_addition_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_ADDITION_MODE_H__ */
Added: trunk/app/gegl/gimpoperationantierasemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationantierasemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationantierasemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationantierasemode.h"
+
+
+static gboolean gimp_operation_anti_erase_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationAntiEraseMode, gimp_operation_anti_erase_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_anti_erase_mode_class_init (GimpOperationAntiEraseModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-anti-erase-mode";
+ operation_class->description = "GIMP anti erase mode operation";
+
+ point_class->process = gimp_operation_anti_erase_mode_process;
+}
+
+static void
+gimp_operation_anti_erase_mode_init (GimpOperationAntiEraseMode *self)
+{
+}
+
+static gboolean
+gimp_operation_anti_erase_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationantierasemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationantierasemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationanti_erasemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_ANTI_ERASE_MODE_H__
+#define __GIMP_OPERATION_ANTI_ERASE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_ANTI_ERASE_MODE (gimp_operation_anti_erase_mode_get_type ())
+#define GIMP_OPERATION_ANTI_ERASE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_ANTI_ERASE_MODE, GimpOperationAntiEraseMode))
+#define GIMP_OPERATION_ANTI_ERASE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_ANTI_ERASE_MODE, GimpOperationAntiEraseModeClass))
+#define GIMP_IS_OPERATION_ANTI_ERASE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_ANTI_ERASE_MODE))
+#define GIMP_IS_OPERATION_ANTI_ERASE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_ANTI_ERASE_MODE))
+#define GIMP_OPERATION_ANTI_ERASE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_ANTI_ERASE_MODE, GimpOperationAntiEraseModeClass))
+
+
+typedef struct _GimpOperationAntiEraseModeClass GimpOperationAntiEraseModeClass;
+
+struct _GimpOperationAntiEraseMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationAntiEraseModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_anti_erase_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_ANTI_ERASE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationbehindmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationbehindmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationbehindmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationbehindmode.h"
+
+
+static gboolean gimp_operation_behind_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationBehindMode, gimp_operation_behind_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_behind_mode_class_init (GimpOperationBehindModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-behind-mode";
+ operation_class->description = "GIMP behind mode operation";
+
+ point_class->process = gimp_operation_behind_mode_process;
+}
+
+static void
+gimp_operation_behind_mode_init (GimpOperationBehindMode *self)
+{
+}
+
+static gboolean
+gimp_operation_behind_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationbehindmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationbehindmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationbehindmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_BEHIND_MODE_H__
+#define __GIMP_OPERATION_BEHIND_MODE_H__
+
+
+#include "gimpoperationpointcomposer.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))
+
+
+typedef struct _GimpOperationBehindModeClass GimpOperationBehindModeClass;
+
+struct _GimpOperationBehindMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationBehindModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_behind_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_BEHIND_MODE_H__ */
Added: trunk/app/gegl/gimpoperationburnmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationburnmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationburnmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationburnmode.h"
+
+
+static gboolean gimp_operation_burn_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationBurnMode, gimp_operation_burn_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_burn_mode_class_init (GimpOperationBurnModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-burn-mode";
+ operation_class->description = "GIMP burn mode operation";
+
+ point_class->process = gimp_operation_burn_mode_process;
+}
+
+static void
+gimp_operation_burn_mode_init (GimpOperationBurnMode *self)
+{
+}
+
+static gboolean
+gimp_operation_burn_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationburnmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationburnmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationburnmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_BURN_MODE_H__
+#define __GIMP_OPERATION_BURN_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_BURN_MODE (gimp_operation_burn_mode_get_type ())
+#define GIMP_OPERATION_BURN_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_BURN_MODE, GimpOperationBurnMode))
+#define GIMP_OPERATION_BURN_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_BURN_MODE, GimpOperationBurnModeClass))
+#define GIMP_IS_OPERATION_BURN_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_BURN_MODE))
+#define GIMP_IS_OPERATION_BURN_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_BURN_MODE))
+#define GIMP_OPERATION_BURN_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_BURN_MODE, GimpOperationBurnModeClass))
+
+
+typedef struct _GimpOperationBurnModeClass GimpOperationBurnModeClass;
+
+struct _GimpOperationBurnMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationBurnModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_burn_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_BURN_MODE_H__ */
Added: trunk/app/gegl/gimpoperationcolorerasemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationcolorerasemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationcolorerasemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationcolorerasemode.h"
+
+
+static gboolean gimp_operation_color_erase_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationColorEraseMode, gimp_operation_color_erase_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_color_erase_mode_class_init (GimpOperationColorEraseModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-color-erase-mode";
+ operation_class->description = "GIMP color erase mode operation";
+
+ point_class->process = gimp_operation_color_erase_mode_process;
+}
+
+static void
+gimp_operation_color_erase_mode_init (GimpOperationColorEraseMode *self)
+{
+}
+
+static gboolean
+gimp_operation_color_erase_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationcolorerasemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationcolorerasemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationcolor_erasemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_COLOR_ERASE_MODE_H__
+#define __GIMP_OPERATION_COLOR_ERASE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_COLOR_ERASE_MODE (gimp_operation_color_erase_mode_get_type ())
+#define GIMP_OPERATION_COLOR_ERASE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_COLOR_ERASE_MODE, GimpOperationColorEraseMode))
+#define GIMP_OPERATION_COLOR_ERASE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_COLOR_ERASE_MODE, GimpOperationColorEraseModeClass))
+#define GIMP_IS_OPERATION_COLOR_ERASE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_COLOR_ERASE_MODE))
+#define GIMP_IS_OPERATION_COLOR_ERASE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_COLOR_ERASE_MODE))
+#define GIMP_OPERATION_COLOR_ERASE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_COLOR_ERASE_MODE, GimpOperationColorEraseModeClass))
+
+
+typedef struct _GimpOperationColorEraseModeClass GimpOperationColorEraseModeClass;
+
+struct _GimpOperationColorEraseMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationColorEraseModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_color_erase_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_COLOR_ERASE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationcolormode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationcolormode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationcolormode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationcolormode.h"
+
+
+static gboolean gimp_operation_color_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationColorMode, gimp_operation_color_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_color_mode_class_init (GimpOperationColorModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-color-mode";
+ operation_class->description = "GIMP color mode operation";
+
+ point_class->process = gimp_operation_color_mode_process;
+}
+
+static void
+gimp_operation_color_mode_init (GimpOperationColorMode *self)
+{
+}
+
+static gboolean
+gimp_operation_color_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationcolormode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationcolormode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationcolormode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_COLOR_MODE_H__
+#define __GIMP_OPERATION_COLOR_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_COLOR_MODE (gimp_operation_color_mode_get_type ())
+#define GIMP_OPERATION_COLOR_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_COLOR_MODE, GimpOperationColorMode))
+#define GIMP_OPERATION_COLOR_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_COLOR_MODE, GimpOperationColorModeClass))
+#define GIMP_IS_OPERATION_COLOR_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_COLOR_MODE))
+#define GIMP_IS_OPERATION_COLOR_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_COLOR_MODE))
+#define GIMP_OPERATION_COLOR_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_COLOR_MODE, GimpOperationColorModeClass))
+
+
+typedef struct _GimpOperationColorModeClass GimpOperationColorModeClass;
+
+struct _GimpOperationColorMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationColorModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_color_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_COLOR_MODE_H__ */
Added: trunk/app/gegl/gimpoperationdarkenonlymode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdarkenonlymode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdarkenonlymode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationdarkenonlymode.h"
+
+
+static gboolean gimp_operation_darken_only_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationDarkenOnlyMode, gimp_operation_darken_only_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_darken_only_mode_class_init (GimpOperationDarkenOnlyModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-darken-only-mode";
+ operation_class->description = "GIMP darken only mode operation";
+
+ point_class->process = gimp_operation_darken_only_mode_process;
+}
+
+static void
+gimp_operation_darken_only_mode_init (GimpOperationDarkenOnlyMode *self)
+{
+}
+
+static gboolean
+gimp_operation_darken_only_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationdarkenonlymode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdarkenonlymode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdarken_onlymode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_DARKEN_ONLY_MODE_H__
+#define __GIMP_OPERATION_DARKEN_ONLY_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE (gimp_operation_darken_only_mode_get_type ())
+#define GIMP_OPERATION_DARKEN_ONLY_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE, GimpOperationDarkenOnlyMode))
+#define GIMP_OPERATION_DARKEN_ONLY_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE, GimpOperationDarkenOnlyModeClass))
+#define GIMP_IS_OPERATION_DARKEN_ONLY_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE))
+#define GIMP_IS_OPERATION_DARKEN_ONLY_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE))
+#define GIMP_OPERATION_DARKEN_ONLY_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE, GimpOperationDarkenOnlyModeClass))
+
+
+typedef struct _GimpOperationDarkenOnlyModeClass GimpOperationDarkenOnlyModeClass;
+
+struct _GimpOperationDarkenOnlyMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationDarkenOnlyModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_darken_only_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_DARKEN_ONLY_MODE_H__ */
Added: trunk/app/gegl/gimpoperationdifferencemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdifferencemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdifferencemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationdifferencemode.h"
+
+
+static gboolean gimp_operation_difference_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationDifferenceMode, gimp_operation_difference_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_difference_mode_class_init (GimpOperationDifferenceModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-difference-mode";
+ operation_class->description = "GIMP difference mode operation";
+
+ point_class->process = gimp_operation_difference_mode_process;
+}
+
+static void
+gimp_operation_difference_mode_init (GimpOperationDifferenceMode *self)
+{
+}
+
+static gboolean
+gimp_operation_difference_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationdifferencemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdifferencemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdifferencemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_DIFFERENCE_MODE_H__
+#define __GIMP_OPERATION_DIFFERENCE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_DIFFERENCE_MODE (gimp_operation_difference_mode_get_type ())
+#define GIMP_OPERATION_DIFFERENCE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DIFFERENCE_MODE, GimpOperationDifferenceMode))
+#define GIMP_OPERATION_DIFFERENCE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DIFFERENCE_MODE, GimpOperationDifferenceModeClass))
+#define GIMP_IS_OPERATION_DIFFERENCE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DIFFERENCE_MODE))
+#define GIMP_IS_OPERATION_DIFFERENCE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DIFFERENCE_MODE))
+#define GIMP_OPERATION_DIFFERENCE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DIFFERENCE_MODE, GimpOperationDifferenceModeClass))
+
+
+typedef struct _GimpOperationDifferenceModeClass GimpOperationDifferenceModeClass;
+
+struct _GimpOperationDifferenceMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationDifferenceModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_difference_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_DIFFERENCE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationdissolvemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdissolvemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdissolvemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationdissolvemode.h"
+
+
+static gboolean gimp_operation_dissolve_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationDissolveMode, gimp_operation_dissolve_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_dissolve_mode_class_init (GimpOperationDissolveModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-dissolve-mode";
+ operation_class->description = "GIMP dissolve mode operation";
+
+ point_class->process = gimp_operation_dissolve_mode_process;
+}
+
+static void
+gimp_operation_dissolve_mode_init (GimpOperationDissolveMode *self)
+{
+}
+
+static gboolean
+gimp_operation_dissolve_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationdissolvemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdissolvemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdissolvemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_DISSOLVE_MODE_H__
+#define __GIMP_OPERATION_DISSOLVE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_DISSOLVE_MODE (gimp_operation_dissolve_mode_get_type ())
+#define GIMP_OPERATION_DISSOLVE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DISSOLVE_MODE, GimpOperationDissolveMode))
+#define GIMP_OPERATION_DISSOLVE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DISSOLVE_MODE, GimpOperationDissolveModeClass))
+#define GIMP_IS_OPERATION_DISSOLVE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DISSOLVE_MODE))
+#define GIMP_IS_OPERATION_DISSOLVE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DISSOLVE_MODE))
+#define GIMP_OPERATION_DISSOLVE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DISSOLVE_MODE, GimpOperationDissolveModeClass))
+
+
+typedef struct _GimpOperationDissolveModeClass GimpOperationDissolveModeClass;
+
+struct _GimpOperationDissolveMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationDissolveModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_dissolve_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_DISSOLVE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationdividemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdividemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdividemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationdividemode.h"
+
+
+static gboolean gimp_operation_divide_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationDivideMode, gimp_operation_divide_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_divide_mode_class_init (GimpOperationDivideModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-divide-mode";
+ operation_class->description = "GIMP divide mode operation";
+
+ point_class->process = gimp_operation_divide_mode_process;
+}
+
+static void
+gimp_operation_divide_mode_init (GimpOperationDivideMode *self)
+{
+}
+
+static gboolean
+gimp_operation_divide_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationdividemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdividemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdividemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_DIVIDE_MODE_H__
+#define __GIMP_OPERATION_DIVIDE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_DIVIDE_MODE (gimp_operation_divide_mode_get_type ())
+#define GIMP_OPERATION_DIVIDE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DIVIDE_MODE, GimpOperationDivideMode))
+#define GIMP_OPERATION_DIVIDE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DIVIDE_MODE, GimpOperationDivideModeClass))
+#define GIMP_IS_OPERATION_DIVIDE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DIVIDE_MODE))
+#define GIMP_IS_OPERATION_DIVIDE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DIVIDE_MODE))
+#define GIMP_OPERATION_DIVIDE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DIVIDE_MODE, GimpOperationDivideModeClass))
+
+
+typedef struct _GimpOperationDivideModeClass GimpOperationDivideModeClass;
+
+struct _GimpOperationDivideMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationDivideModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_divide_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_DIVIDE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationdodgemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdodgemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdodgemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationdodgemode.h"
+
+
+static gboolean gimp_operation_dodge_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationDodgeMode, gimp_operation_dodge_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_dodge_mode_class_init (GimpOperationDodgeModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-dodge-mode";
+ operation_class->description = "GIMP dodge mode operation";
+
+ point_class->process = gimp_operation_dodge_mode_process;
+}
+
+static void
+gimp_operation_dodge_mode_init (GimpOperationDodgeMode *self)
+{
+}
+
+static gboolean
+gimp_operation_dodge_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationdodgemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationdodgemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdodgemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_DODGE_MODE_H__
+#define __GIMP_OPERATION_DODGE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_DODGE_MODE (gimp_operation_dodge_mode_get_type ())
+#define GIMP_OPERATION_DODGE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DODGE_MODE, GimpOperationDodgeMode))
+#define GIMP_OPERATION_DODGE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DODGE_MODE, GimpOperationDodgeModeClass))
+#define GIMP_IS_OPERATION_DODGE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DODGE_MODE))
+#define GIMP_IS_OPERATION_DODGE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DODGE_MODE))
+#define GIMP_OPERATION_DODGE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DODGE_MODE, GimpOperationDodgeModeClass))
+
+
+typedef struct _GimpOperationDodgeModeClass GimpOperationDodgeModeClass;
+
+struct _GimpOperationDodgeMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationDodgeModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_dodge_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_DODGE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationerasemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationerasemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationerasemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationerasemode.h"
+
+
+static gboolean gimp_operation_erase_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationEraseMode, gimp_operation_erase_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_erase_mode_class_init (GimpOperationEraseModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-erase-mode";
+ operation_class->description = "GIMP erase mode operation";
+
+ point_class->process = gimp_operation_erase_mode_process;
+}
+
+static void
+gimp_operation_erase_mode_init (GimpOperationEraseMode *self)
+{
+}
+
+static gboolean
+gimp_operation_erase_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationerasemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationerasemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationerasemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_ERASE_MODE_H__
+#define __GIMP_OPERATION_ERASE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_ERASE_MODE (gimp_operation_erase_mode_get_type ())
+#define GIMP_OPERATION_ERASE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_ERASE_MODE, GimpOperationEraseMode))
+#define GIMP_OPERATION_ERASE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_ERASE_MODE, GimpOperationEraseModeClass))
+#define GIMP_IS_OPERATION_ERASE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_ERASE_MODE))
+#define GIMP_IS_OPERATION_ERASE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_ERASE_MODE))
+#define GIMP_OPERATION_ERASE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_ERASE_MODE, GimpOperationEraseModeClass))
+
+
+typedef struct _GimpOperationEraseModeClass GimpOperationEraseModeClass;
+
+struct _GimpOperationEraseMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationEraseModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_erase_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_ERASE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationgrainextractmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationgrainextractmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationgrainextractmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationgrainextractmode.h"
+
+
+static gboolean gimp_operation_grain_extract_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationGrainExtractMode, gimp_operation_grain_extract_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_grain_extract_mode_class_init (GimpOperationGrainExtractModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-grain-extract-mode";
+ operation_class->description = "GIMP grain extract mode operation";
+
+ point_class->process = gimp_operation_grain_extract_mode_process;
+}
+
+static void
+gimp_operation_grain_extract_mode_init (GimpOperationGrainExtractMode *self)
+{
+}
+
+static gboolean
+gimp_operation_grain_extract_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationgrainextractmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationgrainextractmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationgrain_extractmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_GRAIN_EXTRACT_MODE_H__
+#define __GIMP_OPERATION_GRAIN_EXTRACT_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE (gimp_operation_grain_extract_mode_get_type ())
+#define GIMP_OPERATION_GRAIN_EXTRACT_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE, GimpOperationGrainExtractMode))
+#define GIMP_OPERATION_GRAIN_EXTRACT_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE, GimpOperationGrainExtractModeClass))
+#define GIMP_IS_OPERATION_GRAIN_EXTRACT_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE))
+#define GIMP_IS_OPERATION_GRAIN_EXTRACT_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE))
+#define GIMP_OPERATION_GRAIN_EXTRACT_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE, GimpOperationGrainExtractModeClass))
+
+
+typedef struct _GimpOperationGrainExtractModeClass GimpOperationGrainExtractModeClass;
+
+struct _GimpOperationGrainExtractMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationGrainExtractModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_grain_extract_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_GRAIN_EXTRACT_MODE_H__ */
Added: trunk/app/gegl/gimpoperationgrainmergemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationgrainmergemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationgrainmergemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationgrainmergemode.h"
+
+
+static gboolean gimp_operation_grain_merge_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationGrainMergeMode, gimp_operation_grain_merge_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_grain_merge_mode_class_init (GimpOperationGrainMergeModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-grain-merge-mode";
+ operation_class->description = "GIMP grain merge mode operation";
+
+ point_class->process = gimp_operation_grain_merge_mode_process;
+}
+
+static void
+gimp_operation_grain_merge_mode_init (GimpOperationGrainMergeMode *self)
+{
+}
+
+static gboolean
+gimp_operation_grain_merge_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationgrainmergemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationgrainmergemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationgrain_mergemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_GRAIN_MERGE_MODE_H__
+#define __GIMP_OPERATION_GRAIN_MERGE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE (gimp_operation_grain_merge_mode_get_type ())
+#define GIMP_OPERATION_GRAIN_MERGE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE, GimpOperationGrainMergeMode))
+#define GIMP_OPERATION_GRAIN_MERGE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE, GimpOperationGrainMergeModeClass))
+#define GIMP_IS_OPERATION_GRAIN_MERGE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE))
+#define GIMP_IS_OPERATION_GRAIN_MERGE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE))
+#define GIMP_OPERATION_GRAIN_MERGE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE, GimpOperationGrainMergeModeClass))
+
+
+typedef struct _GimpOperationGrainMergeModeClass GimpOperationGrainMergeModeClass;
+
+struct _GimpOperationGrainMergeMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationGrainMergeModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_grain_merge_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_GRAIN_MERGE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationhardlightmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationhardlightmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationhardlightmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationhardlightmode.h"
+
+
+static gboolean gimp_operation_hardlight_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationHardlightMode, gimp_operation_hardlight_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_hardlight_mode_class_init (GimpOperationHardlightModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-hardlight-mode";
+ operation_class->description = "GIMP hardlight mode operation";
+
+ point_class->process = gimp_operation_hardlight_mode_process;
+}
+
+static void
+gimp_operation_hardlight_mode_init (GimpOperationHardlightMode *self)
+{
+}
+
+static gboolean
+gimp_operation_hardlight_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationhardlightmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationhardlightmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationhardlightmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_HARDLIGHT_MODE_H__
+#define __GIMP_OPERATION_HARDLIGHT_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_HARDLIGHT_MODE (gimp_operation_hardlight_mode_get_type ())
+#define GIMP_OPERATION_HARDLIGHT_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_HARDLIGHT_MODE, GimpOperationHardlightMode))
+#define GIMP_OPERATION_HARDLIGHT_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_HARDLIGHT_MODE, GimpOperationHardlightModeClass))
+#define GIMP_IS_OPERATION_HARDLIGHT_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_HARDLIGHT_MODE))
+#define GIMP_IS_OPERATION_HARDLIGHT_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_HARDLIGHT_MODE))
+#define GIMP_OPERATION_HARDLIGHT_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_HARDLIGHT_MODE, GimpOperationHardlightModeClass))
+
+
+typedef struct _GimpOperationHardlightModeClass GimpOperationHardlightModeClass;
+
+struct _GimpOperationHardlightMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationHardlightModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_hardlight_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_HARDLIGHT_MODE_H__ */
Added: trunk/app/gegl/gimpoperationhuemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationhuemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationhuemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationhuemode.h"
+
+
+static gboolean gimp_operation_hue_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationHueMode, gimp_operation_hue_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_hue_mode_class_init (GimpOperationHueModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-hue-mode";
+ operation_class->description = "GIMP hue mode operation";
+
+ point_class->process = gimp_operation_hue_mode_process;
+}
+
+static void
+gimp_operation_hue_mode_init (GimpOperationHueMode *self)
+{
+}
+
+static gboolean
+gimp_operation_hue_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationhuemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationhuemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationhuemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_HUE_MODE_H__
+#define __GIMP_OPERATION_HUE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_HUE_MODE (gimp_operation_hue_mode_get_type ())
+#define GIMP_OPERATION_HUE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_HUE_MODE, GimpOperationHueMode))
+#define GIMP_OPERATION_HUE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_HUE_MODE, GimpOperationHueModeClass))
+#define GIMP_IS_OPERATION_HUE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_HUE_MODE))
+#define GIMP_IS_OPERATION_HUE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_HUE_MODE))
+#define GIMP_OPERATION_HUE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_HUE_MODE, GimpOperationHueModeClass))
+
+
+typedef struct _GimpOperationHueModeClass GimpOperationHueModeClass;
+
+struct _GimpOperationHueMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationHueModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_hue_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_HUE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationlightenonlymode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationlightenonlymode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationlightenonlymode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationlightenonlymode.h"
+
+
+static gboolean gimp_operation_lighten_only_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationLightenOnlyMode, gimp_operation_lighten_only_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_lighten_only_mode_class_init (GimpOperationLightenOnlyModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-lighten-only-mode";
+ operation_class->description = "GIMP lighten only mode operation";
+
+ point_class->process = gimp_operation_lighten_only_mode_process;
+}
+
+static void
+gimp_operation_lighten_only_mode_init (GimpOperationLightenOnlyMode *self)
+{
+}
+
+static gboolean
+gimp_operation_lighten_only_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationlightenonlymode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationlightenonlymode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationlighten_onlymode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_LIGHTEN_ONLY_MODE_H__
+#define __GIMP_OPERATION_LIGHTEN_ONLY_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_LIGHTEN_ONLY_MODE (gimp_operation_lighten_only_mode_get_type ())
+#define GIMP_OPERATION_LIGHTEN_ONLY_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LIGHTEN_ONLY_MODE, GimpOperationLightenOnlyMode))
+#define GIMP_OPERATION_LIGHTEN_ONLY_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LIGHTEN_ONLY_MODE, GimpOperationLightenOnlyModeClass))
+#define GIMP_IS_OPERATION_LIGHTEN_ONLY_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LIGHTEN_ONLY_MODE))
+#define GIMP_IS_OPERATION_LIGHTEN_ONLY_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LIGHTEN_ONLY_MODE))
+#define GIMP_OPERATION_LIGHTEN_ONLY_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LIGHTEN_ONLY_MODE, GimpOperationLightenOnlyModeClass))
+
+
+typedef struct _GimpOperationLightenOnlyModeClass GimpOperationLightenOnlyModeClass;
+
+struct _GimpOperationLightenOnlyMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationLightenOnlyModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_lighten_only_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_LIGHTEN_ONLY_MODE_H__ */
Added: trunk/app/gegl/gimpoperationmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdissolvemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationdissolvemode.h"
+
+
+static gboolean gimp_operation_dissolve_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationDissolveMode, gimp_operation_dissolve_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_dissolve_mode_class_init (GimpOperationDissolveModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-dissolve-mode";
+ operation_class->description = "GIMP dissolve mode operation";
+
+ point_class->process = gimp_operation_dissolve_mode_process;
+}
+
+static void
+gimp_operation_dissolve_mode_init (GimpOperationDissolveMode *self)
+{
+}
+
+static gboolean
+gimp_operation_dissolve_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdissolvemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_DISSOLVE_MODE_H__
+#define __GIMP_OPERATION_DISSOLVE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_DISSOLVE_MODE (gimp_operation_dissolve_mode_get_type ())
+#define GIMP_OPERATION_DISSOLVE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DISSOLVE_MODE, GimpOperationDissolveMode))
+#define GIMP_OPERATION_DISSOLVE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DISSOLVE_MODE, GimpOperationDissolveModeClass))
+#define GIMP_IS_OPERATION_DISSOLVE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DISSOLVE_MODE))
+#define GIMP_IS_OPERATION_DISSOLVE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DISSOLVE_MODE))
+#define GIMP_OPERATION_DISSOLVE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DISSOLVE_MODE, GimpOperationDissolveModeClass))
+
+
+typedef struct _GimpOperationDissolveModeClass GimpOperationDissolveModeClass;
+
+struct _GimpOperationDissolveMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationDissolveModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_dissolve_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_DISSOLVE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationmultiplymode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationmultiplymode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationmultiplymode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationmultiplymode.h"
+
+
+static gboolean gimp_operation_multiply_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationMultiplyMode, gimp_operation_multiply_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_multiply_mode_class_init (GimpOperationMultiplyModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-multiply-mode";
+ operation_class->description = "GIMP multiply mode operation";
+
+ point_class->process = gimp_operation_multiply_mode_process;
+}
+
+static void
+gimp_operation_multiply_mode_init (GimpOperationMultiplyMode *self)
+{
+}
+
+static gboolean
+gimp_operation_multiply_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationmultiplymode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationmultiplymode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationmultiplymode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_MULTIPLY_MODE_H__
+#define __GIMP_OPERATION_MULTIPLY_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_MULTIPLY_MODE (gimp_operation_multiply_mode_get_type ())
+#define GIMP_OPERATION_MULTIPLY_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_MULTIPLY_MODE, GimpOperationMultiplyMode))
+#define GIMP_OPERATION_MULTIPLY_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_MULTIPLY_MODE, GimpOperationMultiplyModeClass))
+#define GIMP_IS_OPERATION_MULTIPLY_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_MULTIPLY_MODE))
+#define GIMP_IS_OPERATION_MULTIPLY_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_MULTIPLY_MODE))
+#define GIMP_OPERATION_MULTIPLY_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_MULTIPLY_MODE, GimpOperationMultiplyModeClass))
+
+
+typedef struct _GimpOperationMultiplyModeClass GimpOperationMultiplyModeClass;
+
+struct _GimpOperationMultiplyMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationMultiplyModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_multiply_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_MULTIPLY_MODE_H__ */
Added: trunk/app/gegl/gimpoperationoverlaymode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationoverlaymode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationoverlaymode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationoverlaymode.h"
+
+
+static gboolean gimp_operation_overlay_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationOverlayMode, gimp_operation_overlay_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_overlay_mode_class_init (GimpOperationOverlayModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-overlay-mode";
+ operation_class->description = "GIMP overlay mode operation";
+
+ point_class->process = gimp_operation_overlay_mode_process;
+}
+
+static void
+gimp_operation_overlay_mode_init (GimpOperationOverlayMode *self)
+{
+}
+
+static gboolean
+gimp_operation_overlay_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationoverlaymode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationoverlaymode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationoverlaymode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_OVERLAY_MODE_H__
+#define __GIMP_OPERATION_OVERLAY_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_OVERLAY_MODE (gimp_operation_overlay_mode_get_type ())
+#define GIMP_OPERATION_OVERLAY_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_OVERLAY_MODE, GimpOperationOverlayMode))
+#define GIMP_OPERATION_OVERLAY_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_OVERLAY_MODE, GimpOperationOverlayModeClass))
+#define GIMP_IS_OPERATION_OVERLAY_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_OVERLAY_MODE))
+#define GIMP_IS_OPERATION_OVERLAY_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_OVERLAY_MODE))
+#define GIMP_OPERATION_OVERLAY_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_OVERLAY_MODE, GimpOperationOverlayModeClass))
+
+
+typedef struct _GimpOperationOverlayModeClass GimpOperationOverlayModeClass;
+
+struct _GimpOperationOverlayMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationOverlayModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_overlay_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_OVERLAY_MODE_H__ */
Added: trunk/app/gegl/gimpoperationpointcomposer.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationpointcomposer.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,46 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationpointcomposer.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationpointcomposer.h"
+
+
+G_DEFINE_ABSTRACT_TYPE (GimpOperationPointComposer, gimp_operation_point_composer,
+ GEGL_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_point_composer_class_init (GimpOperationPointComposerClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+
+ operation_class->categories = "compositors";
+}
+
+static void
+gimp_operation_point_composer_init (GimpOperationPointComposer *self)
+{
+}
Added: trunk/app/gegl/gimpoperationpointcomposer.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationpointcomposer.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,54 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationpointcomposer.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_POINT_COMPOSER_H__
+#define __GIMP_OPERATION_POINT_COMPOSER_H__
+
+
+#include <gegl-plugin.h>
+#include <operation/gegl-operation-point-composer.h>
+
+
+#define GIMP_TYPE_OPERATION_POINT_COMPOSER (gimp_operation_point_composer_get_type ())
+#define GIMP_OPERATION_POINT_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_POINT_COMPOSER, GimpOperationPointComposer))
+#define GIMP_OPERATION_POINT_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_POINT_COMPOSER, GimpOperationPointComposerClass))
+#define GIMP_IS_OPERATION_POINT_COMPOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_POINT_COMPOSER))
+#define GIMP_IS_OPERATION_POINT_COMPOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_POINT_COMPOSER))
+#define GIMP_OPERATION_POINT_COMPOSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_POINT_COMPOSER, GimpOperationPointComposerClass))
+
+
+typedef struct _GimpOperationPointComposerClass GimpOperationPointComposerClass;
+
+struct _GimpOperationPointComposer
+{
+ GeglOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationPointComposerClass
+{
+ GeglOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_point_composer_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_POINT_COMPOSER_H__ */
Added: trunk/app/gegl/gimpoperationreplacemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationreplacemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationreplacemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationreplacemode.h"
+
+
+static gboolean gimp_operation_replace_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationReplaceMode, gimp_operation_replace_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_replace_mode_class_init (GimpOperationReplaceModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-replace-mode";
+ operation_class->description = "GIMP replace mode operation";
+
+ point_class->process = gimp_operation_replace_mode_process;
+}
+
+static void
+gimp_operation_replace_mode_init (GimpOperationReplaceMode *self)
+{
+}
+
+static gboolean
+gimp_operation_replace_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationreplacemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationreplacemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationreplacemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_REPLACE_MODE_H__
+#define __GIMP_OPERATION_REPLACE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_REPLACE_MODE (gimp_operation_replace_mode_get_type ())
+#define GIMP_OPERATION_REPLACE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_REPLACE_MODE, GimpOperationReplaceMode))
+#define GIMP_OPERATION_REPLACE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_REPLACE_MODE, GimpOperationReplaceModeClass))
+#define GIMP_IS_OPERATION_REPLACE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_REPLACE_MODE))
+#define GIMP_IS_OPERATION_REPLACE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_REPLACE_MODE))
+#define GIMP_OPERATION_REPLACE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_REPLACE_MODE, GimpOperationReplaceModeClass))
+
+
+typedef struct _GimpOperationReplaceModeClass GimpOperationReplaceModeClass;
+
+struct _GimpOperationReplaceMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationReplaceModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_replace_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_REPLACE_MODE_H__ */
Added: trunk/app/gegl/gimpoperationsaturationmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationsaturationmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationsaturationmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationsaturationmode.h"
+
+
+static gboolean gimp_operation_saturation_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationSaturationMode, gimp_operation_saturation_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_saturation_mode_class_init (GimpOperationSaturationModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-saturation-mode";
+ operation_class->description = "GIMP saturation mode operation";
+
+ point_class->process = gimp_operation_saturation_mode_process;
+}
+
+static void
+gimp_operation_saturation_mode_init (GimpOperationSaturationMode *self)
+{
+}
+
+static gboolean
+gimp_operation_saturation_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationsaturationmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationsaturationmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationsaturationmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_SATURATION_MODE_H__
+#define __GIMP_OPERATION_SATURATION_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_SATURATION_MODE (gimp_operation_saturation_mode_get_type ())
+#define GIMP_OPERATION_SATURATION_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_SATURATION_MODE, GimpOperationSaturationMode))
+#define GIMP_OPERATION_SATURATION_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_SATURATION_MODE, GimpOperationSaturationModeClass))
+#define GIMP_IS_OPERATION_SATURATION_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_SATURATION_MODE))
+#define GIMP_IS_OPERATION_SATURATION_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_SATURATION_MODE))
+#define GIMP_OPERATION_SATURATION_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_SATURATION_MODE, GimpOperationSaturationModeClass))
+
+
+typedef struct _GimpOperationSaturationModeClass GimpOperationSaturationModeClass;
+
+struct _GimpOperationSaturationMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationSaturationModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_saturation_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_SATURATION_MODE_H__ */
Added: trunk/app/gegl/gimpoperationscreenmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationscreenmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationscreenmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationscreenmode.h"
+
+
+static gboolean gimp_operation_screen_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationScreenMode, gimp_operation_screen_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_screen_mode_class_init (GimpOperationScreenModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-screen-mode";
+ operation_class->description = "GIMP screen mode operation";
+
+ point_class->process = gimp_operation_screen_mode_process;
+}
+
+static void
+gimp_operation_screen_mode_init (GimpOperationScreenMode *self)
+{
+}
+
+static gboolean
+gimp_operation_screen_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationscreenmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationscreenmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationscreenmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_SCREEN_MODE_H__
+#define __GIMP_OPERATION_SCREEN_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_SCREEN_MODE (gimp_operation_screen_mode_get_type ())
+#define GIMP_OPERATION_SCREEN_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_SCREEN_MODE, GimpOperationScreenMode))
+#define GIMP_OPERATION_SCREEN_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_SCREEN_MODE, GimpOperationScreenModeClass))
+#define GIMP_IS_OPERATION_SCREEN_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_SCREEN_MODE))
+#define GIMP_IS_OPERATION_SCREEN_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_SCREEN_MODE))
+#define GIMP_OPERATION_SCREEN_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_SCREEN_MODE, GimpOperationScreenModeClass))
+
+
+typedef struct _GimpOperationScreenModeClass GimpOperationScreenModeClass;
+
+struct _GimpOperationScreenMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationScreenModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_screen_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_SCREEN_MODE_H__ */
Added: trunk/app/gegl/gimpoperationsoftlightmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationsoftlightmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationsoftlightmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationsoftlightmode.h"
+
+
+static gboolean gimp_operation_softlight_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationSoftlightMode, gimp_operation_softlight_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_softlight_mode_class_init (GimpOperationSoftlightModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-softlight-mode";
+ operation_class->description = "GIMP softlight mode operation";
+
+ point_class->process = gimp_operation_softlight_mode_process;
+}
+
+static void
+gimp_operation_softlight_mode_init (GimpOperationSoftlightMode *self)
+{
+}
+
+static gboolean
+gimp_operation_softlight_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationsoftlightmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationsoftlightmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationsoftlightmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_SOFTLIGHT_MODE_H__
+#define __GIMP_OPERATION_SOFTLIGHT_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_SOFTLIGHT_MODE (gimp_operation_softlight_mode_get_type ())
+#define GIMP_OPERATION_SOFTLIGHT_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE, GimpOperationSoftlightMode))
+#define GIMP_OPERATION_SOFTLIGHT_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE, GimpOperationSoftlightModeClass))
+#define GIMP_IS_OPERATION_SOFTLIGHT_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE))
+#define GIMP_IS_OPERATION_SOFTLIGHT_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE))
+#define GIMP_OPERATION_SOFTLIGHT_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE, GimpOperationSoftlightModeClass))
+
+
+typedef struct _GimpOperationSoftlightModeClass GimpOperationSoftlightModeClass;
+
+struct _GimpOperationSoftlightMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationSoftlightModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_softlight_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_SOFTLIGHT_MODE_H__ */
Added: trunk/app/gegl/gimpoperationsubtractmode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationsubtractmode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationsubtractmode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationsubtractmode.h"
+
+
+static gboolean gimp_operation_subtract_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationSubtractMode, gimp_operation_subtract_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_subtract_mode_class_init (GimpOperationSubtractModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-subtract-mode";
+ operation_class->description = "GIMP subtract mode operation";
+
+ point_class->process = gimp_operation_subtract_mode_process;
+}
+
+static void
+gimp_operation_subtract_mode_init (GimpOperationSubtractMode *self)
+{
+}
+
+static gboolean
+gimp_operation_subtract_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationsubtractmode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationsubtractmode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationsubtractmode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_SUBTRACT_MODE_H__
+#define __GIMP_OPERATION_SUBTRACT_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_SUBTRACT_MODE (gimp_operation_subtract_mode_get_type ())
+#define GIMP_OPERATION_SUBTRACT_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_SUBTRACT_MODE, GimpOperationSubtractMode))
+#define GIMP_OPERATION_SUBTRACT_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_SUBTRACT_MODE, GimpOperationSubtractModeClass))
+#define GIMP_IS_OPERATION_SUBTRACT_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_SUBTRACT_MODE))
+#define GIMP_IS_OPERATION_SUBTRACT_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_SUBTRACT_MODE))
+#define GIMP_OPERATION_SUBTRACT_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_SUBTRACT_MODE, GimpOperationSubtractModeClass))
+
+
+typedef struct _GimpOperationSubtractModeClass GimpOperationSubtractModeClass;
+
+struct _GimpOperationSubtractMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationSubtractModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_subtract_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_SUBTRACT_MODE_H__ */
Added: trunk/app/gegl/gimpoperationvaluemode.c
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationvaluemode.c Sat Oct 11 17:20:20 2008
@@ -0,0 +1,85 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationvaluemode.c
+ * 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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+
+#include "gegl-types.h"
+
+#include "gimpoperationvaluemode.h"
+
+
+static gboolean gimp_operation_value_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi);
+
+
+G_DEFINE_TYPE (GimpOperationValueMode, gimp_operation_value_mode,
+ GIMP_TYPE_OPERATION_POINT_COMPOSER)
+
+
+static void
+gimp_operation_value_mode_class_init (GimpOperationValueModeClass *klass)
+{
+ GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
+ GeglOperationPointComposerClass *point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+
+ operation_class->name = "gimp-value-mode";
+ operation_class->description = "GIMP value mode operation";
+
+ point_class->process = gimp_operation_value_mode_process;
+}
+
+static void
+gimp_operation_value_mode_init (GimpOperationValueMode *self)
+{
+}
+
+static gboolean
+gimp_operation_value_mode_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi)
+{
+ gfloat *src = in_buf;
+ gfloat *aux = aux_buf;
+ gfloat *dest = out_buf;
+
+ while (samples--)
+ {
+ dest[RED_PIX] = src[RED_PIX];
+ dest[GREEN_PIX] = src[GREEN_PIX];
+ dest[BLUE_PIX] = src[BLUE_PIX];
+ dest[ALPHA_PIX] = src[ALPHA_PIX];
+
+ src += 4;
+ aux += 4;
+ dest += 4;
+ }
+
+ return TRUE;
+}
Added: trunk/app/gegl/gimpoperationvaluemode.h
==============================================================================
--- (empty file)
+++ trunk/app/gegl/gimpoperationvaluemode.h Sat Oct 11 17:20:20 2008
@@ -0,0 +1,53 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationvaluemode.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 2 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GIMP_OPERATION_VALUE_MODE_H__
+#define __GIMP_OPERATION_VALUE_MODE_H__
+
+
+#include "gimpoperationpointcomposer.h"
+
+
+#define GIMP_TYPE_OPERATION_VALUE_MODE (gimp_operation_value_mode_get_type ())
+#define GIMP_OPERATION_VALUE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_VALUE_MODE, GimpOperationValueMode))
+#define GIMP_OPERATION_VALUE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_VALUE_MODE, GimpOperationValueModeClass))
+#define GIMP_IS_OPERATION_VALUE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_VALUE_MODE))
+#define GIMP_IS_OPERATION_VALUE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_VALUE_MODE))
+#define GIMP_OPERATION_VALUE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_VALUE_MODE, GimpOperationValueModeClass))
+
+
+typedef struct _GimpOperationValueModeClass GimpOperationValueModeClass;
+
+struct _GimpOperationValueMode
+{
+ GimpOperationPointComposer parent_instance;
+};
+
+struct _GimpOperationValueModeClass
+{
+ GimpOperationPointComposerClass parent_class;
+};
+
+
+GType gimp_operation_value_mode_get_type (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_OPERATION_VALUE_MODE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]