Commit dfb3ddc4 authored by Ell's avatar Ell

app: make erase mode an ordinary layer/paint mode

Include erase mode in the menu for layers and general paint tools.
This makes the eraser tool somewhat unnecessary, but allows for
interesting use cases (e.g., airbrush eraser, etc.)
parent 91ef42d1
......@@ -2463,11 +2463,11 @@ gimp_image_get_xcf_version (GimpImage *image,
case GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY:
case GIMP_LAYER_MODE_LUMINANCE:
case GIMP_LAYER_MODE_COLOR_ERASE:
case GIMP_LAYER_MODE_ERASE:
version = MAX (10, version);
break;
/* Just here instead of default so we get compiler warnings */
case GIMP_LAYER_MODE_ERASE:
case GIMP_LAYER_MODE_REPLACE:
case GIMP_LAYER_MODE_ANTI_ERASE:
case GIMP_LAYER_MODE_SEPARATOR:
......
......@@ -821,7 +821,7 @@ static const GimpLayerModeInfo layer_mode_infos[] =
.function = gimp_operation_erase_process,
.flags = GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_SUBTRACTIVE,
.context = GIMP_LAYER_MODE_CONTEXT_FADE,
.context = GIMP_LAYER_MODE_CONTEXT_ALL,
.paint_composite_mode = GIMP_LAYER_COMPOSITE_SRC_ATOP,
.composite_mode = GIMP_LAYER_COMPOSITE_SRC_ATOP,
.composite_space = GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
......
......@@ -117,9 +117,9 @@ typedef enum
GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY, /*< desc="Luma/Luminance lighten only" >*/
GIMP_LAYER_MODE_LUMINANCE, /*< desc="Luminance" >*/
GIMP_LAYER_MODE_COLOR_ERASE, /*< desc="Color erase" >*/
GIMP_LAYER_MODE_ERASE, /*< desc="Erase" >*/
/* Internal modes, not available to the PDB, must be kept at the end */
GIMP_LAYER_MODE_ERASE, /*< pdb-skip, desc="Erase" >*/
GIMP_LAYER_MODE_REPLACE, /*< pdb-skip, desc="Replace" >*/
GIMP_LAYER_MODE_ANTI_ERASE, /*< pdb-skip, desc="Anti erase" >*/
......
......@@ -152,7 +152,8 @@ typedef enum
GIMP_LAYER_MODE_LUMA_DARKEN_ONLY,
GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LUMINANCE,
GIMP_LAYER_MODE_COLOR_ERASE
GIMP_LAYER_MODE_COLOR_ERASE,
GIMP_LAYER_MODE_ERASE
} GimpLayerMode;
......
......@@ -747,7 +747,7 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LUMA_DARKEN_ONLY
GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY
GIMP_LAYER_MODE_LUMINANCE
GIMP_LAYER_MODE_COLOR_ERASE) ],
GIMP_LAYER_MODE_COLOR_ERASE GIMP_LAYER_MODE_ERASE) ],
mapping => { GIMP_LAYER_MODE_NORMAL_LEGACY => '0',
GIMP_LAYER_MODE_DISSOLVE => '1',
GIMP_LAYER_MODE_BEHIND_LEGACY => '2',
......@@ -805,7 +805,8 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_LUMA_DARKEN_ONLY => '54',
GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY => '55',
GIMP_LAYER_MODE_LUMINANCE => '56',
GIMP_LAYER_MODE_COLOR_ERASE => '57' }
GIMP_LAYER_MODE_COLOR_ERASE => '57',
GIMP_LAYER_MODE_ERASE => '58' }
},
GimpConvertDitherType =>
{ contig => 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment