app: implement color-erase mode as a GimpOperationLayerMode blendfun

... and get rid of the dedicated op.  This gives us support for all
the blend/composite options for this mode.

Rename COLOR_ERASE to COLOR_ERASE_LEGACY, with perceptual blending/
compositing and immutable everything, and add a new COLOR_ERASE
mode, defaulting to linear blending/compositing, with mutable
everything.  Modify affected code.
This commit is contained in:
Ell
2017-03-08 13:06:46 -05:00
parent 398a7b023c
commit b22c09e7b7
13 changed files with 100 additions and 252 deletions

View File

@ -77,7 +77,7 @@ typedef enum
GIMP_LAYER_MODE_SOFTLIGHT_LEGACY, /*< desc="Soft light (legacy)" >*/
GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY, /*< desc="Grain extract (legacy)" >*/
GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY, /*< desc="Grain merge (legacy)" >*/
GIMP_LAYER_MODE_COLOR_ERASE, /*< desc="Color erase" >*/
GIMP_LAYER_MODE_COLOR_ERASE_LEGACY, /*< desc="Color erase (legacy)" >*/
/* Since 2.8 */
GIMP_LAYER_MODE_OVERLAY, /*< desc="Overlay" >*/
@ -116,6 +116,7 @@ typedef enum
GIMP_LAYER_MODE_LUMA_DARKEN_ONLY, /*< desc="Luma/Luminance darken only" >*/
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" >*/
/* Internal modes, not available to the PDB, must be kept at the end */
GIMP_LAYER_MODE_ERASE, /*< pdb-skip, desc="Erase" >*/