[gimp] app: add linear variant of behind mode
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add linear variant of behind mode
- Date: Thu, 12 Jan 2017 13:28:58 +0000 (UTC)
commit 4df1af253429fd27eac2c38d3e65133aa1bab5ac
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Jan 12 14:27:15 2017 +0100
app: add linear variant of behind mode
app/core/core-enums.c | 6 ++++--
app/core/core-enums.h | 3 ++-
app/gegl/gimp-gegl-nodes.c | 3 ++-
app/widgets/gimpwidgets-constructors.c | 3 +++
libgimp/gimpenums.h | 5 +++--
tools/pdbgen/enums.pl | 10 ++++++----
6 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/app/core/core-enums.c b/app/core/core-enums.c
index 45a962b..cb65061 100644
--- a/app/core/core-enums.c
+++ b/app/core/core-enums.c
@@ -291,7 +291,7 @@ gimp_layer_mode_get_type (void)
{
{ GIMP_LAYER_MODE_NORMAL_NON_LINEAR, "GIMP_LAYER_MODE_NORMAL_NON_LINEAR", "normal-non-linear" },
{ GIMP_LAYER_MODE_DISSOLVE, "GIMP_LAYER_MODE_DISSOLVE", "dissolve" },
- { GIMP_LAYER_MODE_BEHIND, "GIMP_LAYER_MODE_BEHIND", "behind" },
+ { GIMP_LAYER_MODE_BEHIND_NON_LINEAR, "GIMP_LAYER_MODE_BEHIND_NON_LINEAR", "behind-non-linear" },
{ GIMP_LAYER_MODE_MULTIPLY_LEGACY, "GIMP_LAYER_MODE_MULTIPLY_LEGACY", "multiply-legacy" },
{ GIMP_LAYER_MODE_SCREEN_LEGACY, "GIMP_LAYER_MODE_SCREEN_LEGACY", "screen-legacy" },
{ GIMP_LAYER_MODE_OVERLAY_LEGACY, "GIMP_LAYER_MODE_OVERLAY_LEGACY", "overlay-legacy" },
@@ -337,6 +337,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_SOFTLIGHT, "GIMP_LAYER_MODE_SOFTLIGHT", "softlight" },
{ GIMP_LAYER_MODE_GRAIN_EXTRACT, "GIMP_LAYER_MODE_GRAIN_EXTRACT", "grain-extract" },
{ GIMP_LAYER_MODE_GRAIN_MERGE, "GIMP_LAYER_MODE_GRAIN_MERGE", "grain-merge" },
+ { GIMP_LAYER_MODE_BEHIND, "GIMP_LAYER_MODE_BEHIND", "behind" },
{ 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" },
@@ -347,7 +348,7 @@ gimp_layer_mode_get_type (void)
{
{ GIMP_LAYER_MODE_NORMAL_NON_LINEAR, NC_("layer-mode", "Normal (non-linear)"), NULL },
{ GIMP_LAYER_MODE_DISSOLVE, NC_("layer-mode", "Dissolve"), NULL },
- { GIMP_LAYER_MODE_BEHIND, NC_("layer-mode", "Behind"), NULL },
+ { GIMP_LAYER_MODE_BEHIND_NON_LINEAR, NC_("layer-mode", "Behind (non-linear)"), NULL },
{ GIMP_LAYER_MODE_MULTIPLY_LEGACY, NC_("layer-mode", "Multiply (legacy)"), NULL },
{ GIMP_LAYER_MODE_SCREEN_LEGACY, NC_("layer-mode", "Screen (legacy)"), NULL },
{ GIMP_LAYER_MODE_OVERLAY_LEGACY, NC_("layer-mode", "Old broken Overlay"), NULL },
@@ -393,6 +394,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_SOFTLIGHT, NC_("layer-mode", "Soft light"), NULL },
{ GIMP_LAYER_MODE_GRAIN_EXTRACT, NC_("layer-mode", "Grain extract"), NULL },
{ GIMP_LAYER_MODE_GRAIN_MERGE, NC_("layer-mode", "Grain merge"), NULL },
+ { GIMP_LAYER_MODE_BEHIND, NC_("layer-mode", "Behind"), 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 99eeb74..0f10a58 100644
--- a/app/core/core-enums.h
+++ b/app/core/core-enums.h
@@ -156,7 +156,7 @@ typedef enum
{
GIMP_LAYER_MODE_NORMAL_NON_LINEAR, /*< desc="Normal (non-linear)" >*/
GIMP_LAYER_MODE_DISSOLVE, /*< desc="Dissolve" >*/
- GIMP_LAYER_MODE_BEHIND, /*< desc="Behind" >*/
+ GIMP_LAYER_MODE_BEHIND_NON_LINEAR, /*< desc="Behind (non-linear)" >*/
GIMP_LAYER_MODE_MULTIPLY_LEGACY, /*< desc="Multiply (legacy)" >*/
GIMP_LAYER_MODE_SCREEN_LEGACY, /*< desc="Screen (legacy)" >*/
GIMP_LAYER_MODE_OVERLAY_LEGACY, /*< desc="Old broken Overlay" >*/
@@ -202,6 +202,7 @@ typedef enum
GIMP_LAYER_MODE_SOFTLIGHT, /*< desc="Soft light" >*/
GIMP_LAYER_MODE_GRAIN_EXTRACT, /*< desc="Grain extract" >*/
GIMP_LAYER_MODE_GRAIN_MERGE, /*< desc="Grain merge" >*/
+ GIMP_LAYER_MODE_BEHIND, /*< desc="Behind" >*/
/* 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 b23eab9..e85e42a 100644
--- a/app/gegl/gimp-gegl-nodes.c
+++ b/app/gegl/gimp-gegl-nodes.c
@@ -146,8 +146,9 @@ gimp_gegl_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_NORMAL:
case GIMP_LAYER_MODE_DISSOLVE:
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
- return TRUE;
case GIMP_LAYER_MODE_BEHIND:
+ return TRUE;
+ case GIMP_LAYER_MODE_BEHIND_NON_LINEAR:
case GIMP_LAYER_MODE_MULTIPLY:
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
case GIMP_LAYER_MODE_SCREEN:
diff --git a/app/widgets/gimpwidgets-constructors.c b/app/widgets/gimpwidgets-constructors.c
index ecf60f8..719e0ca 100644
--- a/app/widgets/gimpwidgets-constructors.c
+++ b/app/widgets/gimpwidgets-constructors.c
@@ -176,6 +176,9 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
GIMP_LAYER_MODE_BEHIND);
gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
GIMP_LAYER_MODE_BEHIND,
+ GIMP_LAYER_MODE_BEHIND_NON_LINEAR);
+ gimp_enum_store_insert_value_after (GIMP_ENUM_STORE (store),
+ GIMP_LAYER_MODE_BEHIND_NON_LINEAR,
GIMP_LAYER_MODE_COLOR_ERASE);
}
diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h
index b956c47..e56921b 100644
--- a/libgimp/gimpenums.h
+++ b/libgimp/gimpenums.h
@@ -71,7 +71,7 @@ typedef enum
{
GIMP_LAYER_MODE_NORMAL_NON_LINEAR,
GIMP_LAYER_MODE_DISSOLVE,
- GIMP_LAYER_MODE_BEHIND,
+ GIMP_LAYER_MODE_BEHIND_NON_LINEAR,
GIMP_LAYER_MODE_MULTIPLY_LEGACY,
GIMP_LAYER_MODE_SCREEN_LEGACY,
GIMP_LAYER_MODE_OVERLAY_LEGACY,
@@ -116,7 +116,8 @@ typedef enum
GIMP_LAYER_MODE_HARDLIGHT,
GIMP_LAYER_MODE_SOFTLIGHT,
GIMP_LAYER_MODE_GRAIN_EXTRACT,
- GIMP_LAYER_MODE_GRAIN_MERGE
+ GIMP_LAYER_MODE_GRAIN_MERGE,
+ GIMP_LAYER_MODE_BEHIND
} GimpLayerMode;
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index 3711e5b..49126b8 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -696,7 +696,8 @@ package Gimp::CodeGen::enums;
{ contig => 1,
header => 'core/core-enums.h',
symbols => [ qw(GIMP_LAYER_MODE_NORMAL_NON_LINEAR
- GIMP_LAYER_MODE_DISSOLVE GIMP_LAYER_MODE_BEHIND
+ GIMP_LAYER_MODE_DISSOLVE
+ GIMP_LAYER_MODE_BEHIND_NON_LINEAR
GIMP_LAYER_MODE_MULTIPLY_LEGACY
GIMP_LAYER_MODE_SCREEN_LEGACY
GIMP_LAYER_MODE_OVERLAY_LEGACY
@@ -735,10 +736,10 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_BURN GIMP_LAYER_MODE_HARDLIGHT
GIMP_LAYER_MODE_SOFTLIGHT
GIMP_LAYER_MODE_GRAIN_EXTRACT
- GIMP_LAYER_MODE_GRAIN_MERGE) ],
+ GIMP_LAYER_MODE_GRAIN_MERGE GIMP_LAYER_MODE_BEHIND) ],
mapping => { GIMP_LAYER_MODE_NORMAL_NON_LINEAR => '0',
GIMP_LAYER_MODE_DISSOLVE => '1',
- GIMP_LAYER_MODE_BEHIND => '2',
+ GIMP_LAYER_MODE_BEHIND_NON_LINEAR => '2',
GIMP_LAYER_MODE_MULTIPLY_LEGACY => '3',
GIMP_LAYER_MODE_SCREEN_LEGACY => '4',
GIMP_LAYER_MODE_OVERLAY_LEGACY => '5',
@@ -783,7 +784,8 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_HARDLIGHT => '44',
GIMP_LAYER_MODE_SOFTLIGHT => '45',
GIMP_LAYER_MODE_GRAIN_EXTRACT => '46',
- GIMP_LAYER_MODE_GRAIN_MERGE => '47' }
+ GIMP_LAYER_MODE_GRAIN_MERGE => '47',
+ GIMP_LAYER_MODE_BEHIND => '48' }
},
GimpBrushApplicationMode =>
{ contig => 1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]