Bug 673501 - Issue with Overlay

GIMP's OVERLAY mode was identical to SOFTLIGHT. This commit fixes the
issue and introduces a NEW_OVERLAY mode and enum value.

- change gimp:overlay-mode to be a real (svg-ish) overlay mode
- when compositing, map OVERLAY to gimp:softlight-mode
- when compisiting, map NEW_OVERLAY to gimp:overlay-mode
- bump the XCF version when NEW_OVERLAY is used
- map OVERLAY to SOFTLIGHT when loading and saving XCF
- map OVERLAY to softlight in all PDB setters
- map OVERLAY to softlight when deserializing a GimpContext
- change all paint mode menus to show an entry for NEW_OVERLAY
  instead of OVERLAY
- change PSP, PSD and OpenRaster to use NEW_OVERLAY

These changes should (redundantly) make sure that no OVERLAY enum
value is used in the core any longer because it gets mapped to
SOFTLIGHT at all entry points, with the downside of introducing a
setter/getter asymmetry when OVERLAY was set in a PDB api.
This commit is contained in:
Michael Natterer 2015-04-27 17:48:00 -04:00
parent 47c31a91e9
commit bc4cf9918f
32 changed files with 142 additions and 32 deletions

View File

@ -57,7 +57,7 @@ static const GimpLayerModeEffects paint_modes[] =
GIMP_MULTIPLY_MODE,
GIMP_DIVIDE_MODE,
GIMP_SCREEN_MODE,
GIMP_OVERLAY_MODE,
GIMP_NEW_OVERLAY_MODE,
GIMP_DODGE_MODE,
GIMP_BURN_MODE,
GIMP_HARDLIGHT_MODE,

View File

@ -82,7 +82,7 @@ static const GimpLayerModeEffects layer_modes[] =
GIMP_MULTIPLY_MODE,
GIMP_DIVIDE_MODE,
GIMP_SCREEN_MODE,
GIMP_OVERLAY_MODE,
GIMP_NEW_OVERLAY_MODE,
GIMP_DODGE_MODE,
GIMP_BURN_MODE,
GIMP_HARDLIGHT_MODE,

View File

@ -275,6 +275,7 @@ gimp_layer_mode_effects_get_type (void)
{ GIMP_GRAIN_EXTRACT_MODE, "GIMP_GRAIN_EXTRACT_MODE", "grain-extract-mode" },
{ GIMP_GRAIN_MERGE_MODE, "GIMP_GRAIN_MERGE_MODE", "grain-merge-mode" },
{ GIMP_COLOR_ERASE_MODE, "GIMP_COLOR_ERASE_MODE", "color-erase-mode" },
{ GIMP_NEW_OVERLAY_MODE, "GIMP_NEW_OVERLAY_MODE", "new-overlay-mode" },
{ GIMP_ERASE_MODE, "GIMP_ERASE_MODE", "erase-mode" },
{ GIMP_REPLACE_MODE, "GIMP_REPLACE_MODE", "replace-mode" },
{ GIMP_ANTI_ERASE_MODE, "GIMP_ANTI_ERASE_MODE", "anti-erase-mode" },
@ -288,7 +289,7 @@ gimp_layer_mode_effects_get_type (void)
{ GIMP_BEHIND_MODE, NC_("layer-mode-effects", "Behind"), NULL },
{ GIMP_MULTIPLY_MODE, NC_("layer-mode-effects", "Multiply"), NULL },
{ GIMP_SCREEN_MODE, NC_("layer-mode-effects", "Screen"), NULL },
{ GIMP_OVERLAY_MODE, NC_("layer-mode-effects", "Overlay"), NULL },
{ GIMP_OVERLAY_MODE, NC_("layer-mode-effects", "Old broken Overlay"), NULL },
{ GIMP_DIFFERENCE_MODE, NC_("layer-mode-effects", "Difference"), NULL },
{ GIMP_ADDITION_MODE, NC_("layer-mode-effects", "Addition"), NULL },
{ GIMP_SUBTRACT_MODE, NC_("layer-mode-effects", "Subtract"), NULL },
@ -306,6 +307,7 @@ gimp_layer_mode_effects_get_type (void)
{ GIMP_GRAIN_EXTRACT_MODE, NC_("layer-mode-effects", "Grain extract"), NULL },
{ GIMP_GRAIN_MERGE_MODE, NC_("layer-mode-effects", "Grain merge"), NULL },
{ GIMP_COLOR_ERASE_MODE, NC_("layer-mode-effects", "Color erase"), NULL },
{ GIMP_NEW_OVERLAY_MODE, NC_("layer-mode-effects", "Overlay"), NULL },
{ GIMP_ERASE_MODE, NC_("layer-mode-effects", "Erase"), NULL },
{ GIMP_REPLACE_MODE, NC_("layer-mode-effects", "Replace"), NULL },
{ GIMP_ANTI_ERASE_MODE, NC_("layer-mode-effects", "Anti erase"), NULL },

View File

@ -144,7 +144,7 @@ typedef enum
GIMP_BEHIND_MODE, /*< desc="Behind" >*/
GIMP_MULTIPLY_MODE, /*< desc="Multiply" >*/
GIMP_SCREEN_MODE, /*< desc="Screen" >*/
GIMP_OVERLAY_MODE, /*< desc="Overlay" >*/
GIMP_OVERLAY_MODE, /*< desc="Old broken Overlay" >*/
GIMP_DIFFERENCE_MODE, /*< desc="Difference" >*/
GIMP_ADDITION_MODE, /*< desc="Addition" >*/
GIMP_SUBTRACT_MODE, /*< desc="Subtract" >*/
@ -162,6 +162,7 @@ typedef enum
GIMP_GRAIN_EXTRACT_MODE, /*< desc="Grain extract" >*/
GIMP_GRAIN_MERGE_MODE, /*< desc="Grain merge" >*/
GIMP_COLOR_ERASE_MODE, /*< desc="Color erase" >*/
GIMP_NEW_OVERLAY_MODE, /*< desc="Overlay" >*/
/* internal modes, not available to the PDB */
GIMP_ERASE_MODE = 1000, /*< pdb-skip, desc="Erase" >*/

View File

@ -86,6 +86,10 @@ static gint64 gimp_context_get_memsize (GimpObject *object,
static gboolean gimp_context_serialize (GimpConfig *config,
GimpConfigWriter *writer,
gpointer data);
static gboolean gimp_context_deserialize (GimpConfig *config,
GScanner *scanner,
gint nest_level,
gpointer data);
static gboolean gimp_context_serialize_property (GimpConfig *config,
guint property_id,
const GValue *value,
@ -777,6 +781,7 @@ static void
gimp_context_config_iface_init (GimpConfigInterface *iface)
{
iface->serialize = gimp_context_serialize;
iface->deserialize = gimp_context_deserialize;
iface->serialize_property = gimp_context_serialize_property;
iface->deserialize_property = gimp_context_deserialize_property;
}
@ -1251,6 +1256,27 @@ gimp_context_serialize (GimpConfig *config,
return gimp_config_serialize_changed_properties (config, writer);
}
static gboolean
gimp_context_deserialize (GimpConfig *config,
GScanner *scanner,
gint nest_level,
gpointer data)
{
GimpContext *context = GIMP_CONTEXT (config);
GimpLayerModeEffects old_paint_mode = context->paint_mode;
gboolean success;
success = gimp_config_deserialize_properties (config, scanner, nest_level);
if (context->paint_mode != old_paint_mode)
{
if (context->paint_mode == GIMP_OVERLAY_MODE)
g_object_set (context, "paint-mode", GIMP_SOFTLIGHT_MODE, NULL);
}
return success;
}
static gboolean
gimp_context_serialize_property (GimpConfig *config,
guint property_id,

View File

@ -2315,6 +2315,11 @@ gimp_image_get_xcf_version (GimpImage *image,
version = MAX (2, version);
break;
/* new layer modes not supported by gimp-2.8 */
case GIMP_NEW_OVERLAY_MODE:
version = MAX (9, version);
break;
default:
break;
}
@ -2355,6 +2360,7 @@ gimp_image_get_xcf_version (GimpImage *image,
case 6:
case 7:
case 8:
case 9:
if (gimp_version) *gimp_version = 210;
if (version_string) *version_string = "GIMP 2.10";
break;

View File

@ -155,7 +155,7 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
case GIMP_BEHIND_MODE: operation = "gimp:behind-mode"; break;
case GIMP_MULTIPLY_MODE: operation = "gimp:multiply-mode"; break;
case GIMP_SCREEN_MODE: operation = "gimp:screen-mode"; break;
case GIMP_OVERLAY_MODE: operation = "gimp:overlay-mode"; break;
case GIMP_OVERLAY_MODE: operation = "gimp:softlight-mode"; break;
case GIMP_DIFFERENCE_MODE: operation = "gimp:difference-mode"; break;
case GIMP_ADDITION_MODE: operation = "gimp:addition-mode"; break;
case GIMP_SUBTRACT_MODE: operation = "gimp:subtract-mode"; break;
@ -173,6 +173,7 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
case GIMP_GRAIN_EXTRACT_MODE: operation = "gimp:grain-extract-mode"; break;
case GIMP_GRAIN_MERGE_MODE: operation = "gimp:grain-merge-mode"; break;
case GIMP_COLOR_ERASE_MODE: operation = "gimp:color-erase-mode"; break;
case GIMP_NEW_OVERLAY_MODE: operation = "gimp:overlay-mode"; break;
case GIMP_ERASE_MODE: operation = "gimp:erase-mode"; break;
case GIMP_REPLACE_MODE: operation = "gimp:replace-mode"; break;
case GIMP_ANTI_ERASE_MODE: operation = "gimp:anti-erase-mode"; break;

View File

@ -65,7 +65,7 @@ get_layer_mode_function (GimpLayerModeEffects paint_mode)
case GIMP_BEHIND_MODE: func = gimp_operation_behind_mode_process_pixels; break;
case GIMP_MULTIPLY_MODE: func = gimp_operation_multiply_mode_process_pixels; break;
case GIMP_SCREEN_MODE: func = gimp_operation_screen_mode_process_pixels; break;
case GIMP_OVERLAY_MODE: func = gimp_operation_overlay_mode_process_pixels; break;
case GIMP_OVERLAY_MODE: func = gimp_operation_softlight_mode_process_pixels; break;
case GIMP_DIFFERENCE_MODE: func = gimp_operation_difference_mode_process_pixels; break;
case GIMP_ADDITION_MODE: func = gimp_operation_addition_mode_process_pixels; break;
case GIMP_SUBTRACT_MODE: func = gimp_operation_subtract_mode_process_pixels; break;
@ -83,6 +83,7 @@ get_layer_mode_function (GimpLayerModeEffects paint_mode)
case GIMP_GRAIN_EXTRACT_MODE: func = gimp_operation_grain_extract_mode_process_pixels; break;
case GIMP_GRAIN_MERGE_MODE: func = gimp_operation_grain_merge_mode_process_pixels; break;
case GIMP_COLOR_ERASE_MODE: func = gimp_operation_color_erase_mode_process_pixels; break;
case GIMP_NEW_OVERLAY_MODE: func = gimp_operation_overlay_mode_process_pixels; break;
case GIMP_ERASE_MODE: func = gimp_operation_erase_mode_process_pixels; break;
case GIMP_REPLACE_MODE: func = gimp_operation_replace_mode_process_pixels; break;
case GIMP_ANTI_ERASE_MODE: func = gimp_operation_anti_erase_mode_process_pixels; break;

View File

@ -108,7 +108,12 @@ gimp_operation_overlay_mode_process_pixels (gfloat *in,
for (b = RED; b < ALPHA; b++)
{
gfloat comp = in[b] * (in[b] + (2.0 * layer[b]) * (1.0 - in[b]));
gfloat comp;
if (in[b] < 0.5)
comp = 2.0 * in[b] * layer[b];
else
comp = 1.0 - 2.0 * (1.0 - layer[b]) * (1.0 - in[b]);
out[b] = comp * ratio + in[b] * (1.0 - ratio);
}

View File

@ -126,6 +126,18 @@ gimp_operation_softlight_mode_process_pixels (gfloat *in,
for (b = RED; b < ALPHA; b++)
{
#if 0
/* softlight is now used for what GIMP formerly called
* OVERLAY. We fixed OVERLAY to use the right math
* (under the name NEW_OVERLAY), and redirect uses of
* the old OVERLAY blend mode here. This math was
* formerly used for OVERLAY and is exactly the same as
* the multiply, screen, comp math used below.
* See bug #673501.
*/
gfloat comp = in[b] * (in[b] + (2.0 * layer[b]) * (1.0 - in[b]));
#endif
gfloat multiply = in[b] * layer[b];
gfloat screen = 1.0 - (1.0 - in[b]) * (1.0 - layer[b]);
gfloat comp = (1.0 - in[b]) * multiply + in[b] * screen;

View File

@ -61,6 +61,9 @@ brushes_popup_invoker (GimpProcedure *procedure,
if (success)
{
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
@ -126,6 +129,9 @@ brushes_set_popup_invoker (GimpProcedure *procedure,
if (success)
{
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->brush_factory),

View File

@ -207,6 +207,9 @@ brushes_get_brush_data_invoker (GimpProcedure *procedure,
{
GimpBrush *brush;
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
if (name && strlen (name))
brush = gimp_pdb_get_brush (gimp, name, FALSE, error);
else

View File

@ -366,6 +366,9 @@ context_set_paint_mode_invoker (GimpProcedure *procedure,
if (success)
{
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
gimp_context_set_paint_mode (context, paint_mode);
}

View File

@ -604,6 +604,9 @@ edit_bucket_fill_invoker (GimpProcedure *procedure,
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpFillType fill_type;
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
switch (fill_mode)
{
default:
@ -685,6 +688,9 @@ edit_bucket_fill_full_invoker (GimpProcedure *procedure,
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpFillType fill_type;
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
switch (fill_mode)
{
default:
@ -788,6 +794,9 @@ edit_blend_invoker (GimpProcedure *procedure,
{
GimpGradient *gradient;
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
if (progress)
gimp_progress_start (progress, FALSE, _("Blending"));

View File

@ -83,6 +83,9 @@ layer_new_invoker (GimpProcedure *procedure,
gboolean has_alpha = FALSE;
const Babl *format;
if (mode == GIMP_OVERLAY_MODE)
mode = GIMP_SOFTLIGHT_MODE;
switch (type)
{
case GIMP_RGB_IMAGE:
@ -1128,6 +1131,9 @@ layer_set_mode_invoker (GimpProcedure *procedure,
if (success)
{
if (mode == GIMP_OVERLAY_MODE)
mode = GIMP_SOFTLIGHT_MODE;
gimp_layer_set_mode (layer, mode, TRUE);
}

View File

@ -116,7 +116,7 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
GIMP_MULTIPLY_MODE,
GIMP_BURN_MODE,
GIMP_OVERLAY_MODE,
GIMP_NEW_OVERLAY_MODE,
GIMP_SOFTLIGHT_MODE,
GIMP_HARDLIGHT_MODE,

View File

@ -1050,6 +1050,10 @@ xcf_load_layer_props (XcfInfo *info,
guint32 mode;
info->cp += xcf_read_int32 (info->input, &mode, 1);
if (mode == GIMP_OVERLAY_MODE)
mode = GIMP_SOFTLIGHT_MODE;
gimp_layer_set_mode (*layer, (GimpLayerModeEffects) mode, FALSE);
}
break;

View File

@ -683,6 +683,9 @@ xcf_save_prop (XcfInfo *info,
mode = va_arg (args, gint32);
size = 4;
if (mode == GIMP_OVERLAY_MODE)
mode = GIMP_SOFTLIGHT_MODE;
xcf_write_prop_type_check_error (info, prop_type);
xcf_write_int32_check_error (info, &size, 1);
xcf_write_int32_check_error (info, (guint32 *) &mode, 1);

View File

@ -75,7 +75,8 @@ static GimpXcfLoaderFunc * const xcf_loaders[] =
xcf_load_image, /* version 5 */
xcf_load_image, /* version 6 */
xcf_load_image, /* version 7 */
xcf_load_image /* version 8 */
xcf_load_image, /* version 8 */
xcf_load_image /* version 9 */
};

View File

@ -94,4 +94,5 @@ gimpenums
@GIMP_GRAIN_EXTRACT_MODE:
@GIMP_GRAIN_MERGE_MODE:
@GIMP_COLOR_ERASE_MODE:
@GIMP_NEW_OVERLAY_MODE:

View File

@ -90,7 +90,8 @@ typedef enum
GIMP_SOFTLIGHT_MODE,
GIMP_GRAIN_EXTRACT_MODE,
GIMP_GRAIN_MERGE_MODE,
GIMP_COLOR_ERASE_MODE
GIMP_COLOR_ERASE_MODE,
GIMP_NEW_OVERLAY_MODE
} GimpLayerModeEffects;

View File

@ -1009,7 +1009,7 @@ gimp_layer_mode_from_psp_blend_mode (PSPBlendModes mode)
case PSP_BLEND_DISSOLVE:
return GIMP_DISSOLVE_MODE;
case PSP_BLEND_OVERLAY:
return GIMP_OVERLAY_MODE;
return GIMP_NEW_OVERLAY_MODE;
case PSP_BLEND_HARD_LIGHT:
return GIMP_HARDLIGHT_MODE;
case PSP_BLEND_SOFT_LIGHT:

View File

@ -234,10 +234,11 @@ psd_lmode_layer (gint32 idLayer,
case GIMP_HARDLIGHT_MODE:
strcpy (psdMode, "hLit");
break;
case GIMP_OVERLAY_MODE:
case GIMP_SOFTLIGHT_MODE:
strcpy (psdMode, "sLit");
break;
case GIMP_OVERLAY_MODE:
case GIMP_NEW_OVERLAY_MODE:
strcpy (psdMode, "over");
break;
default:

View File

@ -649,16 +649,7 @@ psd_to_gimp_blend_mode (const gchar *psd_mode)
if (g_ascii_strncasecmp (psd_mode, "diss", 4) == 0) /* Dissolve (ps3) */
return GIMP_DISSOLVE_MODE;
if (g_ascii_strncasecmp (psd_mode, "over", 4) == 0) /* Overlay (ps3) */
{
if (CONVERSION_WARNINGS)
{
static gchar *mode_name = "OVERLAY";
g_message ("Gimp uses a different equation to photoshop for "
"blend mode: %s. Results will differ.",
mode_name);
}
return GIMP_OVERLAY_MODE;
}
return GIMP_NEW_OVERLAY_MODE;
if (g_ascii_strncasecmp (psd_mode, "hLit", 4) == 0) /* Hard light (ps3) */
return GIMP_HARDLIGHT_MODE;
if (g_ascii_strncasecmp (psd_mode, "sLit", 4) == 0) /* Soft light (ps3) */
@ -776,11 +767,7 @@ gimp_to_psd_blend_mode (GimpLayerModeEffects gimp_layer_mode)
case GIMP_SCREEN_MODE:
psd_mode = g_strndup ("scrn", 4); /* Screen (ps3) */
break;
case GIMP_OVERLAY_MODE:
if (CONVERSION_WARNINGS)
g_message ("Gimp uses a different equation to photoshop for "
"blend mode: %s. Results will differ.",
gimp_layer_mode_effects_name (gimp_layer_mode));
case GIMP_NEW_OVERLAY_MODE:
psd_mode = g_strndup ("over", 4); /* Overlay (ps3) */
break;
case GIMP_DIFFERENCE_MODE:
@ -836,6 +823,7 @@ gimp_to_psd_blend_mode (GimpLayerModeEffects gimp_layer_mode)
case GIMP_HARDLIGHT_MODE:
psd_mode = g_strndup ("hLit", 4); /* Hard Light (ps3) */
break;
case GIMP_OVERLAY_MODE:
case GIMP_SOFTLIGHT_MODE:
if (CONVERSION_WARNINGS)
g_message ("Unsupported blend mode: %s. Mode reverts to normal",

View File

@ -162,6 +162,7 @@
'("grain-extract-mode" "GIMP_GRAIN_EXTRACT_MODE")
'("grain-merge-mode" "GIMP_GRAIN_MERGE_MODE")
'("color-erase-mode" "GIMP_COLOR_ERASE_MODE")
'("new-overlay-mode" "GIMP_NEW_OVERLAY_MODE")
)
)

View File

@ -26,7 +26,7 @@ layermodes_map = {
"svg:src-over": NORMAL_MODE,
"svg:multiply": MULTIPLY_MODE,
"svg:screen": SCREEN_MODE,
"svg:overlay": OVERLAY_MODE,
"svg:overlay": NEW_OVERLAY_MODE,
"svg:darken": DARKEN_ONLY_MODE,
"svg:lighten": LIGHTEN_ONLY_MODE,
"svg:color-dodge": DODGE_MODE,

View File

@ -637,7 +637,8 @@ package Gimp::CodeGen::enums;
GIMP_VALUE_MODE GIMP_DIVIDE_MODE GIMP_DODGE_MODE
GIMP_BURN_MODE GIMP_HARDLIGHT_MODE
GIMP_SOFTLIGHT_MODE GIMP_GRAIN_EXTRACT_MODE
GIMP_GRAIN_MERGE_MODE GIMP_COLOR_ERASE_MODE) ],
GIMP_GRAIN_MERGE_MODE GIMP_COLOR_ERASE_MODE
GIMP_NEW_OVERLAY_MODE) ],
mapping => { GIMP_NORMAL_MODE => '0',
GIMP_DISSOLVE_MODE => '1',
GIMP_BEHIND_MODE => '2',
@ -660,7 +661,8 @@ package Gimp::CodeGen::enums;
GIMP_SOFTLIGHT_MODE => '19',
GIMP_GRAIN_EXTRACT_MODE => '20',
GIMP_GRAIN_MERGE_MODE => '21',
GIMP_COLOR_ERASE_MODE => '22' }
GIMP_COLOR_ERASE_MODE => '22',
GIMP_NEW_OVERLAY_MODE => '23' }
},
GimpBrushApplicationMode =>
{ contig => 1,

View File

@ -42,6 +42,9 @@ sub brushes_popup {
%invoke = (
code => <<'CODE'
{
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
@ -104,6 +107,9 @@ sub brushes_set_popup {
%invoke = (
code => <<'CODE'
{
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->brush_factory),

View File

@ -173,6 +173,9 @@ sub brushes_get_brush_data {
{
GimpBrush *brush;
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
if (name && strlen (name))
brush = gimp_pdb_get_brush (gimp, name, FALSE, error);
else

View File

@ -419,6 +419,9 @@ HELP
%invoke = (
code => <<'CODE'
{
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
gimp_context_set_paint_mode (context, paint_mode);
}
CODE

View File

@ -640,6 +640,9 @@ HELP
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpFillType fill_type;
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
switch (fill_mode)
{
default:
@ -749,6 +752,9 @@ HELP
GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpFillType fill_type;
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
switch (fill_mode)
{
default:
@ -861,6 +867,9 @@ HELP
{
GimpGradient *gradient;
if (paint_mode == GIMP_OVERLAY_MODE)
paint_mode = GIMP_SOFTLIGHT_MODE;
if (progress)
gimp_progress_start (progress, FALSE, _("Blending"));

View File

@ -59,6 +59,9 @@ HELP
gboolean has_alpha = FALSE;
const Babl *format;
if (mode == GIMP_OVERLAY_MODE)
mode = GIMP_SOFTLIGHT_MODE;
switch (type)
{
case GIMP_RGB_IMAGE:
@ -1182,6 +1185,9 @@ sub layer_set_mode {
%invoke = (
code => <<'CODE'
{
if (mode == GIMP_OVERLAY_MODE)
mode = GIMP_SOFTLIGHT_MODE;
gimp_layer_set_mode (layer, mode, TRUE);
}
CODE