[gimp] app: split dodge op in legacy and new
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: split dodge op in legacy and new
- Date: Mon, 9 Jan 2017 19:31:10 +0000 (UTC)
commit 076621dd75f1459d121aae933919e0f47533e56f
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jan 9 05:32:08 2017 +0100
app: split dodge op in legacy and new
app/core/core-enums.c | 4 +-
app/core/core-enums.h | 3 +-
app/gegl/gimp-gegl-nodes.c | 7 +-
app/operations/Makefile.am | 6 +-
app/operations/gimp-operations.c | 6 +-
app/operations/gimplayermodefunctions.c | 9 +-
app/operations/gimpoperationdodge.c | 136 ++++++++++++++++++++
app/operations/gimpoperationdodge.h | 62 +++++++++
...ationdodgemode.c => gimpoperationdodgelegacy.c} | 64 +++++-----
app/operations/gimpoperationdodgelegacy.h | 61 +++++++++
app/operations/gimpoperationdodgemode.h | 61 ---------
app/widgets/gimpwidgets-constructors.c | 1 +
libgimp/gimpenums.h | 3 +-
tools/pdbgen/enums.pl | 6 +-
14 files changed, 324 insertions(+), 105 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index 7c74306..646c29f 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -320,6 +320,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_NORMAL, "GIMP_LAYER_MODE_NORMAL", "normal" },
{ GIMP_LAYER_MODE_MULTIPLY, "GIMP_LAYER_MODE_MULTIPLY", "multiply" },
{ GIMP_LAYER_MODE_MULTIPLY_LINEAR, "GIMP_LAYER_MODE_MULTIPLY_LINEAR", "multiply-linear" },
+ { GIMP_LAYER_MODE_DODGE, "GIMP_LAYER_MODE_DODGE", "dodge" },
{ GIMP_LAYER_MODE_ERASE, "GIMP_LAYER_MODE_ERASE", "erase" },
{ GIMP_LAYER_MODE_REPLACE, "GIMP_LAYER_MODE_REPLACE", "replace" },
{ GIMP_LAYER_MODE_ANTI_ERASE, "GIMP_LAYER_MODE_ANTI_ERASE", "anti-erase" },
@@ -344,7 +345,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_HSV_COLOR_LEGACY, NC_("layer-mode", "Color (HSV)"), NULL },
{ GIMP_LAYER_MODE_HSV_VALUE_LEGACY, NC_("layer-mode", "Value (HSV)"), NULL },
{ GIMP_LAYER_MODE_DIVIDE_LEGACY, NC_("layer-mode", "Divide"), NULL },
- { GIMP_LAYER_MODE_DODGE_LEGACY, NC_("layer-mode", "Dodge"), NULL },
+ { GIMP_LAYER_MODE_DODGE_LEGACY, NC_("layer-mode", "Dodge (legacy)"), NULL },
{ GIMP_LAYER_MODE_BURN_LEGACY, NC_("layer-mode", "Burn"), NULL },
{ GIMP_LAYER_MODE_HARDLIGHT_LEGACY, NC_("layer-mode", "Hard light"), NULL },
{ GIMP_LAYER_MODE_SOFTLIGHT_LEGACY, NC_("layer-mode", "Soft light"), NULL },
@@ -359,6 +360,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_NORMAL, NC_("layer-mode", "Normal"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY, NC_("layer-mode", "Multiply"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY_LINEAR, NC_("layer-mode", "Multiply (linear)"), NULL },
+ { GIMP_LAYER_MODE_DODGE, NC_("layer-mode", "Dodge"), NULL },
{ GIMP_LAYER_MODE_ERASE, NC_("layer-mode", "Erase"), NULL },
{ GIMP_LAYER_MODE_REPLACE, NC_("layer-mode", "Replace"), NULL },
{ GIMP_LAYER_MODE_ANTI_ERASE, NC_("layer-mode", "Anti erase"), NULL },
diff --git a/app/core/core-enums.h b/app/core/core-enums.h
index c6b8ad2..d49e50d 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -170,7 +170,7 @@ typedef enum
GIMP_LAYER_MODE_HSV_COLOR_LEGACY, /*< desc="Color (HSV)" >*/
GIMP_LAYER_MODE_HSV_VALUE_LEGACY, /*< desc="Value (HSV)" >*/
GIMP_LAYER_MODE_DIVIDE_LEGACY, /*< desc="Divide" >*/
- GIMP_LAYER_MODE_DODGE_LEGACY, /*< desc="Dodge" >*/
+ GIMP_LAYER_MODE_DODGE_LEGACY, /*< desc="Dodge (legacy)" >*/
GIMP_LAYER_MODE_BURN_LEGACY, /*< desc="Burn" >*/
GIMP_LAYER_MODE_HARDLIGHT_LEGACY, /*< desc="Hard light" >*/
GIMP_LAYER_MODE_SOFTLIGHT_LEGACY, /*< desc="Soft light" >*/
@@ -185,6 +185,7 @@ typedef enum
GIMP_LAYER_MODE_NORMAL, /*< desc="Normal" >*/
GIMP_LAYER_MODE_MULTIPLY, /*< desc="Multiply" >*/
GIMP_LAYER_MODE_MULTIPLY_LINEAR, /*< desc="Multiply (linear)" >*/
+ GIMP_LAYER_MODE_DODGE, /*< desc="Dodge" >*/
/* internal modes, not available to the PDB */
GIMP_LAYER_MODE_ERASE = 1000, /*< pdb-skip, desc="Erase" >*/
diff --git a/app/gegl/gimp-gegl-nodes.c b/app/gegl/gimp-gegl-nodes.c
index 88f94bb..5388346 100644
--- a/app/gegl/gimp-gegl-nodes.c
+++ b/app/gegl/gimp-gegl-nodes.c
@@ -219,8 +219,12 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
operation = "gimp:divide-mode";
break;
+ case GIMP_LAYER_MODE_DODGE:
+ operation = "gimp:dodge";
+ break;
+
case GIMP_LAYER_MODE_DODGE_LEGACY:
- operation = "gimp:dodge-mode";
+ operation = "gimp:dodge-legacy";
break;
case GIMP_LAYER_MODE_BURN_LEGACY:
@@ -319,6 +323,7 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
case GIMP_LAYER_MODE_HSV_COLOR_LEGACY:
case GIMP_LAYER_MODE_HSV_VALUE_LEGACY:
case GIMP_LAYER_MODE_DIVIDE_LEGACY:
+ case GIMP_LAYER_MODE_DODGE:
case GIMP_LAYER_MODE_DODGE_LEGACY:
case GIMP_LAYER_MODE_BURN_LEGACY:
case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
diff --git a/app/operations/Makefile.am b/app/operations/Makefile.am
index 8b49ee5..cae0628 100644
--- a/app/operations/Makefile.am
+++ b/app/operations/Makefile.am
@@ -130,8 +130,10 @@ libappoperations_generic_a_sources = \
gimpoperationvaluemode.h \
gimpoperationdividemode.c \
gimpoperationdividemode.h \
- gimpoperationdodgemode.c \
- gimpoperationdodgemode.h \
+ gimpoperationdodge.c \
+ gimpoperationdodge.h \
+ gimpoperationdodgelegacy.c \
+ gimpoperationdodgelegacy.h \
gimpoperationburnmode.c \
gimpoperationburnmode.h \
gimpoperationhardlightmode.c \
diff --git a/app/operations/gimp-operations.c b/app/operations/gimp-operations.c
index d31e109..e286524 100644
--- a/app/operations/gimp-operations.c
+++ b/app/operations/gimp-operations.c
@@ -83,7 +83,8 @@
#include "gimpoperationcolormode.h"
#include "gimpoperationvaluemode.h"
#include "gimpoperationdividemode.h"
-#include "gimpoperationdodgemode.h"
+#include "gimpoperationdodge.h"
+#include "gimpoperationdodgelegacy.h"
#include "gimpoperationburnmode.h"
#include "gimpoperationhardlightmode.h"
#include "gimpoperationsoftlightmode.h"
@@ -148,7 +149,8 @@ gimp_operations_init (void)
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_DODGE);
+ g_type_class_ref (GIMP_TYPE_OPERATION_DODGE_LEGACY);
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);
diff --git a/app/operations/gimplayermodefunctions.c b/app/operations/gimplayermodefunctions.c
index 405c70e..638453d 100644
--- a/app/operations/gimplayermodefunctions.c
+++ b/app/operations/gimplayermodefunctions.c
@@ -43,7 +43,8 @@
#include "gimpoperationcolormode.h"
#include "gimpoperationvaluemode.h"
#include "gimpoperationdividemode.h"
-#include "gimpoperationdodgemode.h"
+#include "gimpoperationdodge.h"
+#include "gimpoperationdodgelegacy.h"
#include "gimpoperationburnmode.h"
#include "gimpoperationhardlightmode.h"
#include "gimpoperationsoftlightmode.h"
@@ -135,8 +136,12 @@ get_layer_mode_function (GimpLayerMode paint_mode,
func = gimp_operation_divide_mode_process_pixels;
break;
+ case GIMP_LAYER_MODE_DODGE:
+ func = gimp_operation_dodge_process_pixels;
+ break;
+
case GIMP_LAYER_MODE_DODGE_LEGACY:
- func = gimp_operation_dodge_mode_process_pixels;
+ func = gimp_operation_dodge_legacy_process_pixels;
break;
case GIMP_LAYER_MODE_BURN_LEGACY:
diff --git a/app/operations/gimpoperationdodge.c b/app/operations/gimpoperationdodge.c
new file mode 100644
index 0000000..85e2f88
--- /dev/null
+++ b/app/operations/gimpoperationdodge.c
@@ -0,0 +1,136 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdodge.c
+ * Copyright (C) 2008 Michael Natterer <mitch gimp org>
+ * 2012 Ville Sokk <ville sokk gmail com>
+ * 2017 Øyvind Kolås <pippin gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gegl-plugin.h>
+
+#include "operations-types.h"
+
+#include "gimpoperationdodge.h"
+
+
+static gboolean gimp_operation_dodge_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+
+G_DEFINE_TYPE (GimpOperationDodge, gimp_operation_dodge,
+ GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
+
+
+static void
+gimp_operation_dodge_class_init (GimpOperationDodgeClass *klass)
+{
+ GeglOperationClass *operation_class;
+ GeglOperationPointComposer3Class *point_class;
+
+ operation_class = GEGL_OPERATION_CLASS (klass);
+ point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
+
+ gegl_operation_class_set_keys (operation_class,
+ "name", "gimp:dodge",
+ "description", "GIMP dodge mode operation",
+ NULL);
+
+ point_class->process = gimp_operation_dodge_process;
+}
+
+static void
+gimp_operation_dodge_init (GimpOperationDodge *self)
+{
+}
+
+static gboolean
+gimp_operation_dodge_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
+{
+ gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+
+ return gimp_operation_dodge_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi,
level);
+}
+
+gboolean
+gimp_operation_dodge_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
+{
+ const gboolean has_mask = mask != NULL;
+
+ while (samples--)
+ {
+ gfloat comp_alpha;
+
+ comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
+ if (has_mask)
+ comp_alpha *= *mask;
+
+ if (comp_alpha != 0.0f)
+ {
+ gint b;
+
+ for (b = RED; b < ALPHA; b++)
+ {
+ gfloat comp = in[b] / (1.0 - layer[b]);
+ comp = MIN (comp, 1.0);
+
+ out[b] = comp * comp_alpha + in[b] * (1.0 - comp_alpha);
+ }
+ }
+ else
+ {
+ gint b;
+
+ for (b = RED; b < ALPHA; b++)
+ {
+ out[b] = in[b];
+ }
+ }
+
+ out[ALPHA] = in[ALPHA];
+
+ in += 4;
+ layer += 4;
+ out += 4;
+
+ if (has_mask)
+ mask++;
+ }
+
+ return TRUE;
+}
diff --git a/app/operations/gimpoperationdodge.h b/app/operations/gimpoperationdodge.h
new file mode 100644
index 0000000..a73ebdf
--- /dev/null
+++ b/app/operations/gimpoperationdodge.h
@@ -0,0 +1,62 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpoperationdodge.h
+ * Copyright (C) 2008 Michael Natterer <mitch gimp org>
+ * 2017 Øyvind Kolås <pippin gimp org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_OPERATION_DODGE_H__
+#define __GIMP_OPERATION_DODGE_H__
+
+
+#include "gimpoperationpointlayermode.h"
+
+
+#define GIMP_TYPE_OPERATION_DODGE (gimp_operation_dodge_get_type ())
+#define GIMP_OPERATION_DODGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DODGE,
GimpOperationDodge))
+#define GIMP_OPERATION_DODGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DODGE,
GimpOperationDodgeClass))
+#define GIMP_IS_OPERATION_DODGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DODGE))
+#define GIMP_IS_OPERATION_DODGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DODGE))
+#define GIMP_OPERATION_DODGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DODGE,
GimpOperationDodgeClass))
+
+
+typedef struct _GimpOperationDodge GimpOperationDodge;
+typedef struct _GimpOperationDodgeClass GimpOperationDodgeClass;
+
+struct _GimpOperationDodge
+{
+ GimpOperationPointLayerMode parent_instance;
+};
+
+struct _GimpOperationDodgeClass
+{
+ GimpOperationPointLayerModeClass parent_class;
+};
+
+
+GType gimp_operation_dodge_get_type (void) G_GNUC_CONST;
+
+gboolean gimp_operation_dodge_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+#endif /* __GIMP_OPERATION_DODGE_H__ */
diff --git a/app/operations/gimpoperationdodgemode.c b/app/operations/gimpoperationdodgelegacy.c
similarity index 51%
rename from app/operations/gimpoperationdodgemode.c
rename to app/operations/gimpoperationdodgelegacy.c
index ed0f3f1..2765d9a 100644
--- a/app/operations/gimpoperationdodgemode.c
+++ b/app/operations/gimpoperationdodgelegacy.c
@@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
- * gimpoperationdodgemode.c
+ * gimpoperationdodgelegacy.c
* Copyright (C) 2008 Michael Natterer <mitch gimp org>
* 2012 Ville Sokk <ville sokk gmail com>
*
@@ -25,25 +25,25 @@
#include "operations-types.h"
-#include "gimpoperationdodgemode.h"
+#include "gimpoperationdodgelegacy.h"
-static gboolean gimp_operation_dodge_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
+static gboolean gimp_operation_dodge_legacy_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
-G_DEFINE_TYPE (GimpOperationDodgeMode, gimp_operation_dodge_mode,
+G_DEFINE_TYPE (GimpOperationDodgeLegacy, gimp_operation_dodge_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
static void
-gimp_operation_dodge_mode_class_init (GimpOperationDodgeModeClass *klass)
+gimp_operation_dodge_legacy_class_init (GimpOperationDodgeLegacyClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@@ -52,42 +52,42 @@ gimp_operation_dodge_mode_class_init (GimpOperationDodgeModeClass *klass)
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
gegl_operation_class_set_keys (operation_class,
- "name", "gimp:dodge-mode",
+ "name", "gimp:dodge-legacy",
"description", "GIMP dodge mode operation",
NULL);
- point_class->process = gimp_operation_dodge_mode_process;
+ point_class->process = gimp_operation_dodge_legacy_process;
}
static void
-gimp_operation_dodge_mode_init (GimpOperationDodgeMode *self)
+gimp_operation_dodge_legacy_init (GimpOperationDodgeLegacy *self)
{
}
static gboolean
-gimp_operation_dodge_mode_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_dodge_legacy_process (GeglOperation *operation,
+ void *in_buf,
+ void *aux_buf,
+ void *aux2_buf,
+ void *out_buf,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
- return gimp_operation_dodge_mode_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples,
roi, level);
+ return gimp_operation_dodge_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples,
roi, level);
}
gboolean
-gimp_operation_dodge_mode_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level)
+gimp_operation_dodge_legacy_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
const gboolean has_mask = mask != NULL;
diff --git a/app/operations/gimpoperationdodgelegacy.h b/app/operations/gimpoperationdodgelegacy.h
new file mode 100644
index 0000000..b47b853
--- /dev/null
+++ b/app/operations/gimpoperationdodgelegacy.h
@@ -0,0 +1,61 @@
+/* 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_OPERATION_DODGE_LEGACY_H__
+#define __GIMP_OPERATION_DODGE_LEGACY_H__
+
+
+#include "gimpoperationpointlayermode.h"
+
+
+#define GIMP_TYPE_OPERATION_DODGE_LEGACY (gimp_operation_dodge_legacy_get_type ())
+#define GIMP_OPERATION_DODGE_LEGACY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIMP_TYPE_OPERATION_DODGE_LEGACY, GimpOperationDodgeLegacy))
+#define GIMP_OPERATION_DODGE_LEGACY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIMP_TYPE_OPERATION_DODGE_LEGACY, GimpOperationDodgeLegacyClass))
+#define GIMP_IS_OPERATION_DODGE_LEGACY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIMP_TYPE_OPERATION_DODGE_LEGACY))
+#define GIMP_IS_OPERATION_DODGE_LEGACY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIMP_TYPE_OPERATION_DODGE_LEGACY))
+#define GIMP_OPERATION_DODGE_LEGACY_GET_CLASS(obj)(G_TYPE_INSTANCE_GET_CLASS ((obj),
GIMP_TYPE_OPERATION_DODGE_LEGACY, GimpOperationDodgeLegacyClass))
+
+
+typedef struct _GimpOperationDodgeLegacy GimpOperationDodgeLegacy;
+typedef struct _GimpOperationDodgeLegacyClass GimpOperationDodgeLegacyClass;
+
+struct _GimpOperationDodgeLegacy
+{
+ GimpOperationPointLayerMode parent_instance;
+};
+
+struct _GimpOperationDodgeLegacyClass
+{
+ GimpOperationPointLayerModeClass parent_class;
+};
+
+
+GType gimp_operation_dodge_legacy_get_type (void) G_GNUC_CONST;
+
+gboolean gimp_operation_dodge_legacy_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+#endif /* __GIMP_OPERATION_DODGE_LEGACY_H__ */
diff --git a/app/widgets/gimpwidgets-constructors.c b/app/widgets/gimpwidgets-constructors.c
index 6a42c51..ee6dfe0 100644
--- a/app/widgets/gimpwidgets-constructors.c
+++ b/app/widgets/gimpwidgets-constructors.c
@@ -111,6 +111,7 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY,
GIMP_LAYER_MODE_SCREEN_LEGACY,
+ GIMP_LAYER_MODE_DODGE,
GIMP_LAYER_MODE_DODGE_LEGACY,
GIMP_LAYER_MODE_ADDITION_LEGACY,
diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h
index 5f9a20f..006f97d 100644
--- a/libgimp/gimpenums.h
+++ b/libgimp/gimpenums.h
@@ -99,7 +99,8 @@ typedef enum
GIMP_LAYER_MODE_LCH_LIGHTNESS,
GIMP_LAYER_MODE_NORMAL,
GIMP_LAYER_MODE_MULTIPLY,
- GIMP_LAYER_MODE_MULTIPLY_LINEAR
+ GIMP_LAYER_MODE_MULTIPLY_LINEAR,
+ GIMP_LAYER_MODE_DODGE
} GimpLayerMode;
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 0e79cf6..95181d0 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -722,7 +722,8 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LCH_COLOR
GIMP_LAYER_MODE_LCH_LIGHTNESS
GIMP_LAYER_MODE_NORMAL GIMP_LAYER_MODE_MULTIPLY
- GIMP_LAYER_MODE_MULTIPLY_LINEAR) ],
+ GIMP_LAYER_MODE_MULTIPLY_LINEAR
+ GIMP_LAYER_MODE_DODGE) ],
mapping => { GIMP_LAYER_MODE_NORMAL_NON_LINEAR => '0',
GIMP_LAYER_MODE_DISSOLVE => '1',
GIMP_LAYER_MODE_BEHIND => '2',
@@ -753,7 +754,8 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LCH_LIGHTNESS => '27',
GIMP_LAYER_MODE_NORMAL => '28',
GIMP_LAYER_MODE_MULTIPLY => '29',
- GIMP_LAYER_MODE_MULTIPLY_LINEAR => '30' }
+ GIMP_LAYER_MODE_MULTIPLY_LINEAR => '30',
+ GIMP_LAYER_MODE_DODGE => '31' }
},
GimpBrushApplicationMode =>
{ contig => 1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]