Commit 31241a98 authored by Michael Natterer's avatar Michael Natterer 😴

app, libgimp: remove GIMP_LAYER_MODE_DARKEN,LIGHTEN_ONLY_LINEAR

There is no _LINEAR variant, the modes always do the same.
parent 09af8dbc
......@@ -331,9 +331,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_SUBTRACT, "GIMP_LAYER_MODE_SUBTRACT", "subtract" },
{ GIMP_LAYER_MODE_SUBTRACT_LINEAR, "GIMP_LAYER_MODE_SUBTRACT_LINEAR", "subtract-linear" },
{ GIMP_LAYER_MODE_DARKEN_ONLY, "GIMP_LAYER_MODE_DARKEN_ONLY", "darken-only" },
{ GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR, "GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR", "darken-only-linear" },
{ GIMP_LAYER_MODE_LIGHTEN_ONLY, "GIMP_LAYER_MODE_LIGHTEN_ONLY", "lighten-only" },
{ GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR, "GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR", "lighten-only-linear" },
{ GIMP_LAYER_MODE_HSV_HUE, "GIMP_LAYER_MODE_HSV_HUE", "hsv-hue" },
{ GIMP_LAYER_MODE_HSV_SATURATION, "GIMP_LAYER_MODE_HSV_SATURATION", "hsv-saturation" },
{ GIMP_LAYER_MODE_HSV_COLOR, "GIMP_LAYER_MODE_HSV_COLOR", "hsv-color" },
......@@ -412,9 +410,7 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_SUBTRACT, NC_("layer-mode", "Subtract"), NULL },
{ GIMP_LAYER_MODE_SUBTRACT_LINEAR, NC_("layer-mode", "Subtract (linear)"), NULL },
{ GIMP_LAYER_MODE_DARKEN_ONLY, NC_("layer-mode", "Darken only"), NULL },
{ GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR, NC_("layer-mode", "Darken only (linear)"), NULL },
{ GIMP_LAYER_MODE_LIGHTEN_ONLY, NC_("layer-mode", "Lighten only"), NULL },
{ GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR, NC_("layer-mode", "Lighten only (linear)"), NULL },
{ GIMP_LAYER_MODE_HSV_HUE, NC_("layer-mode", "Hue (HSV)"), NULL },
{ GIMP_LAYER_MODE_HSV_SATURATION, NC_("layer-mode", "Saturation (HSV)"), NULL },
{ GIMP_LAYER_MODE_HSV_COLOR, NC_("layer-mode", "Color (HSV)"), NULL },
......
......@@ -201,9 +201,7 @@ typedef enum
GIMP_LAYER_MODE_SUBTRACT, /*< desc="Subtract" >*/
GIMP_LAYER_MODE_SUBTRACT_LINEAR, /*< desc="Subtract (linear)" >*/
GIMP_LAYER_MODE_DARKEN_ONLY, /*< desc="Darken only" >*/
GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR, /*< desc="Darken only (linear)" >*/
GIMP_LAYER_MODE_LIGHTEN_ONLY, /*< desc="Lighten only" >*/
GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR, /*< desc="Lighten only (linear)" >*/
GIMP_LAYER_MODE_HSV_HUE, /*< desc="Hue (HSV)" >*/
GIMP_LAYER_MODE_HSV_SATURATION, /*< desc="Saturation (HSV)" >*/
GIMP_LAYER_MODE_HSV_COLOR, /*< desc="Color (HSV)" >*/
......
......@@ -143,8 +143,6 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
case GIMP_LAYER_MODE_DODGE_LINEAR:
case GIMP_LAYER_MODE_BURN_LINEAR:
......@@ -163,7 +161,7 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_REPLACE:
case GIMP_LAYER_MODE_ANTI_ERASE:
return TRUE;
}
}
return TRUE;
}
......@@ -198,10 +196,6 @@ gimp_layer_mode_get_blend_space (GimpLayerMode mode)
case GIMP_LAYER_MODE_BEHIND:
return GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL;
case GIMP_LAYER_MODE_DARKEN_ONLY:
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
return GIMP_LAYER_COLOR_SPACE_RGB_LINEAR;
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
case GIMP_LAYER_MODE_SCREEN_LEGACY:
case GIMP_LAYER_MODE_OVERLAY_LEGACY:
......@@ -266,8 +260,8 @@ gimp_layer_mode_get_blend_space (GimpLayerMode mode)
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
case GIMP_LAYER_MODE_DARKEN_ONLY:
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
case GIMP_LAYER_MODE_DODGE_LINEAR:
case GIMP_LAYER_MODE_BURN_LINEAR:
......@@ -286,7 +280,7 @@ gimp_layer_mode_get_blend_space (GimpLayerMode mode)
case GIMP_LAYER_MODE_REPLACE:
case GIMP_LAYER_MODE_ANTI_ERASE:
return GIMP_LAYER_COLOR_SPACE_RGB_LINEAR;
}
}
return GIMP_LAYER_COLOR_SPACE_RGB_LINEAR;
}
......@@ -303,8 +297,10 @@ gimp_layer_mode_get_composite_mode (GimpLayerMode mode)
switch (mode)
{
case GIMP_LAYER_MODE_NORMAL_NON_LINEAR:
case GIMP_LAYER_MODE_NORMAL:
case GIMP_LAYER_MODE_DISSOLVE:
case GIMP_LAYER_MODE_BEHIND:
case GIMP_LAYER_MODE_BEHIND_LINEAR:
return GIMP_LAYER_COMPOSITE_SRC_OVER;
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
......@@ -326,26 +322,23 @@ gimp_layer_mode_get_composite_mode (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
case GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY:
return GIMP_LAYER_COMPOSITE_SRC_ATOP;
case GIMP_LAYER_MODE_COLOR_ERASE:
case GIMP_LAYER_MODE_OVERLAY:
return GIMP_LAYER_COMPOSITE_SRC_ATOP;
case GIMP_LAYER_MODE_LCH_HUE:
case GIMP_LAYER_MODE_LCH_CHROMA:
case GIMP_LAYER_MODE_LCH_COLOR:
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
return GIMP_LAYER_COMPOSITE_SRC_ATOP;
case GIMP_LAYER_MODE_NORMAL:
return GIMP_LAYER_COMPOSITE_SRC_OVER;
case GIMP_LAYER_MODE_MULTIPLY:
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
case GIMP_LAYER_MODE_SCREEN:
case GIMP_LAYER_MODE_SCREEN_LINEAR:
case GIMP_LAYER_MODE_OVERLAY_LINEAR:
case GIMP_LAYER_MODE_DIFFERENCE:
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
case GIMP_LAYER_MODE_ADDITION:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
case GIMP_LAYER_MODE_SUBTRACT:
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
case GIMP_LAYER_MODE_DARKEN_ONLY:
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
case GIMP_LAYER_MODE_HSV_HUE:
......@@ -353,39 +346,28 @@ gimp_layer_mode_get_composite_mode (GimpLayerMode mode)
case GIMP_LAYER_MODE_HSV_COLOR:
case GIMP_LAYER_MODE_HSV_VALUE:
case GIMP_LAYER_MODE_DIVIDE:
case GIMP_LAYER_MODE_DODGE:
case GIMP_LAYER_MODE_BURN:
case GIMP_LAYER_MODE_HARDLIGHT:
case GIMP_LAYER_MODE_SOFTLIGHT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_MERGE:
case GIMP_LAYER_MODE_VIVID_LIGHT:
case GIMP_LAYER_MODE_PIN_LIGHT:
case GIMP_LAYER_MODE_LINEAR_LIGHT:
case GIMP_LAYER_MODE_EXCLUSION:
case GIMP_LAYER_MODE_LINEAR_BURN:
return GIMP_LAYER_COMPOSITE_SRC_ATOP;
case GIMP_LAYER_MODE_BEHIND_LINEAR:
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
case GIMP_LAYER_MODE_SCREEN_LINEAR:
case GIMP_LAYER_MODE_OVERLAY_LINEAR:
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
case GIMP_LAYER_MODE_DODGE:
case GIMP_LAYER_MODE_DODGE_LINEAR:
case GIMP_LAYER_MODE_BURN:
case GIMP_LAYER_MODE_BURN_LINEAR:
case GIMP_LAYER_MODE_HARDLIGHT:
case GIMP_LAYER_MODE_HARDLIGHT_LINEAR:
case GIMP_LAYER_MODE_SOFTLIGHT:
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_MERGE:
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
case GIMP_LAYER_MODE_VIVID_LIGHT:
case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
case GIMP_LAYER_MODE_PIN_LIGHT:
case GIMP_LAYER_MODE_PIN_LIGHT_LINEAR:
case GIMP_LAYER_MODE_LINEAR_LIGHT:
case GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR:
case GIMP_LAYER_MODE_EXCLUSION:
case GIMP_LAYER_MODE_EXCLUSION_LINEAR:
case GIMP_LAYER_MODE_LINEAR_BURN:
case GIMP_LAYER_MODE_LINEAR_BURN_LINEAR:
return GIMP_LAYER_COMPOSITE_SRC_ATOP;
......@@ -393,7 +375,7 @@ gimp_layer_mode_get_composite_mode (GimpLayerMode mode)
case GIMP_LAYER_MODE_REPLACE:
case GIMP_LAYER_MODE_ANTI_ERASE:
return GIMP_LAYER_COMPOSITE_SRC_OVER;
}
}
return GIMP_LAYER_COMPOSITE_SRC_OVER;
}
......@@ -483,8 +465,10 @@ gimp_layer_mode_get_operation (GimpLayerMode mode)
case GIMP_LAYER_MODE_ANTI_ERASE:
return "gimp:anti-erase";
default:
return "gimp:layer-mode";
}
return "gimp:layer-mode";
}
......@@ -1695,7 +1695,7 @@ static inline GimpBlendFunc gimp_layer_mode_get_blend_fun (GimpLayerMode mode)
case GIMP_LAYER_MODE_GRAIN_MERGE: return blendfun_grain_merge;
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_EXTRACT: return blendfun_grain_extract;
case GIMP_LAYER_MODE_DODGE_LINEAR:
case GIMP_LAYER_MODE_DODGE_LINEAR:
case GIMP_LAYER_MODE_DODGE: return blendfun_dodge;
case GIMP_LAYER_MODE_OVERLAY_LINEAR:
case GIMP_LAYER_MODE_OVERLAY: return blendfun_overlay;
......@@ -1713,11 +1713,9 @@ static inline GimpBlendFunc gimp_layer_mode_get_blend_fun (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT: return blendfun_softlight;
case GIMP_LAYER_MODE_DIVIDE:
case GIMP_LAYER_MODE_DIVIDE_LINEAR: return blendfun_divide;
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
case GIMP_LAYER_MODE_DIFFERENCE: return blendfun_difference;
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
case GIMP_LAYER_MODE_DARKEN_ONLY: return blendfun_darken_only;
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
case GIMP_LAYER_MODE_LIGHTEN_ONLY: return blendfun_lighten_only;
case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
case GIMP_LAYER_MODE_VIVID_LIGHT: return blendfun_vivid_light;
......
......@@ -111,9 +111,7 @@ typedef enum
GIMP_LAYER_MODE_SUBTRACT,
GIMP_LAYER_MODE_SUBTRACT_LINEAR,
GIMP_LAYER_MODE_DARKEN_ONLY,
GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR,
GIMP_LAYER_MODE_LIGHTEN_ONLY,
GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR,
GIMP_LAYER_MODE_HSV_HUE,
GIMP_LAYER_MODE_HSV_SATURATION,
GIMP_LAYER_MODE_HSV_COLOR,
......
......@@ -735,9 +735,7 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_SUBTRACT
GIMP_LAYER_MODE_SUBTRACT_LINEAR
GIMP_LAYER_MODE_DARKEN_ONLY
GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR
GIMP_LAYER_MODE_LIGHTEN_ONLY
GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR
GIMP_LAYER_MODE_HSV_HUE
GIMP_LAYER_MODE_HSV_SATURATION
GIMP_LAYER_MODE_HSV_COLOR
......@@ -805,37 +803,35 @@ package Gimp::CodeGen::enums;
GIMP_LAYER_MODE_SUBTRACT => '39',
GIMP_LAYER_MODE_SUBTRACT_LINEAR => '40',
GIMP_LAYER_MODE_DARKEN_ONLY => '41',
GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR => '42',
GIMP_LAYER_MODE_LIGHTEN_ONLY => '43',
GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR => '44',
GIMP_LAYER_MODE_HSV_HUE => '45',
GIMP_LAYER_MODE_HSV_SATURATION => '46',
GIMP_LAYER_MODE_HSV_COLOR => '47',
GIMP_LAYER_MODE_HSV_VALUE => '48',
GIMP_LAYER_MODE_DIVIDE => '49',
GIMP_LAYER_MODE_DIVIDE_LINEAR => '50',
GIMP_LAYER_MODE_DODGE => '51',
GIMP_LAYER_MODE_DODGE_LINEAR => '52',
GIMP_LAYER_MODE_BURN => '53',
GIMP_LAYER_MODE_BURN_LINEAR => '54',
GIMP_LAYER_MODE_HARDLIGHT => '55',
GIMP_LAYER_MODE_HARDLIGHT_LINEAR => '56',
GIMP_LAYER_MODE_SOFTLIGHT => '57',
GIMP_LAYER_MODE_SOFTLIGHT_LINEAR => '58',
GIMP_LAYER_MODE_GRAIN_EXTRACT => '59',
GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR => '60',
GIMP_LAYER_MODE_GRAIN_MERGE => '61',
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR => '62',
GIMP_LAYER_MODE_VIVID_LIGHT => '63',
GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR => '64',
GIMP_LAYER_MODE_PIN_LIGHT => '65',
GIMP_LAYER_MODE_PIN_LIGHT_LINEAR => '66',
GIMP_LAYER_MODE_LINEAR_LIGHT => '67',
GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR => '68',
GIMP_LAYER_MODE_EXCLUSION => '69',
GIMP_LAYER_MODE_EXCLUSION_LINEAR => '70',
GIMP_LAYER_MODE_LINEAR_BURN => '71',
GIMP_LAYER_MODE_LINEAR_BURN_LINEAR => '72' }
GIMP_LAYER_MODE_LIGHTEN_ONLY => '42',
GIMP_LAYER_MODE_HSV_HUE => '43',
GIMP_LAYER_MODE_HSV_SATURATION => '44',
GIMP_LAYER_MODE_HSV_COLOR => '45',
GIMP_LAYER_MODE_HSV_VALUE => '46',
GIMP_LAYER_MODE_DIVIDE => '47',
GIMP_LAYER_MODE_DIVIDE_LINEAR => '48',
GIMP_LAYER_MODE_DODGE => '49',
GIMP_LAYER_MODE_DODGE_LINEAR => '50',
GIMP_LAYER_MODE_BURN => '51',
GIMP_LAYER_MODE_BURN_LINEAR => '52',
GIMP_LAYER_MODE_HARDLIGHT => '53',
GIMP_LAYER_MODE_HARDLIGHT_LINEAR => '54',
GIMP_LAYER_MODE_SOFTLIGHT => '55',
GIMP_LAYER_MODE_SOFTLIGHT_LINEAR => '56',
GIMP_LAYER_MODE_GRAIN_EXTRACT => '57',
GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR => '58',
GIMP_LAYER_MODE_GRAIN_MERGE => '59',
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR => '60',
GIMP_LAYER_MODE_VIVID_LIGHT => '61',
GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR => '62',
GIMP_LAYER_MODE_PIN_LIGHT => '63',
GIMP_LAYER_MODE_PIN_LIGHT_LINEAR => '64',
GIMP_LAYER_MODE_LINEAR_LIGHT => '65',
GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR => '66',
GIMP_LAYER_MODE_EXCLUSION => '67',
GIMP_LAYER_MODE_EXCLUSION_LINEAR => '68',
GIMP_LAYER_MODE_LINEAR_BURN => '69',
GIMP_LAYER_MODE_LINEAR_BURN_LINEAR => '70' }
},
GimpBrushApplicationMode =>
{ 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