Commit d97be7ed authored by Øyvind "pippin" Kolås's avatar Øyvind "pippin" Kolås
Browse files

app: add repository of layer mode information

parent 1214d4ac
......@@ -1948,3 +1948,562 @@ static inline GimpBlendFunc gimp_layer_mode_get_blend_fun (GimpLayerMode mode)
}
return (void*)dummy_fun;
}
struct _GimpOperationLayerModeInfo
{
GimpLayerMode layer_mode;
gchar *mode_name;
gchar *op_name;
GimpLayerModeFlags flags;
GimpLayerCompositeMode composite_mode;
GimpLayerColorSpace composite_space;
GimpLayerColorSpace blend_space;
};
static GimpLayerModeInfo gimp_layer_mode_infos[]=
{
{ GIMP_LAYER_MODE_NORMAL,
"gimp:normal",
0,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_DISSOLVE,
"gimp:dissolve",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_OVER,
},
{ GIMP_LAYER_MODE_BEHIND,
"gimp:behind",
0,
GIMP_LAYER_COMPOSITE_SRC_OVER
},
{ GIMP_LAYER_MODE_MULTIPLY_LEGACY,
"gimp:multiply-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY
},
{ GIMP_LAYER_MODE_SCREEN_LEGACY,
"gimp:screen-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_OVERLAY_LEGACY,
"gimp:overlay-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_DIFFERENCE_LEGACY,
"gimp:difference-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_ADDITION_LEGACY,
"gimp:addition-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_SUBTRACT_LEGACY,
"gimp:subtract-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY,
"gimp:darken-only-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY,
"gimp:lighten-only-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_HSV_HUE_LEGACY,
"gimp:hsv-hue-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_HSV_SATURATION_LEGACY,
"gimp:hsv-saturation-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_HSV_COLOR_LEGACY,
"gimp:hsv-color-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_HSV_VALUE_LEGACY,
"gimp:hsv-value-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_DIVIDE_LEGACY,
"gimp:divide-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_DODGE_LEGACY,
"gimp:dodge-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_BURN_LEGACY,
"gimp:burn-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_HARDLIGHT_LEGACY,
"gimp:hardlight-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_SOFTLIGHT_LEGACY,
"gimp:softlight-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY,
"gimp:grain-extract-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY,
"gimp:grain-merge-legacy",
GIMP_LAYER_MODE_FLAG_LEGACY,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_COLOR_ERASE,
"gimp:color-erase",
0,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_OVERLAY,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_LCH_HUE,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_LAB
},
{ GIMP_LAYER_MODE_LCH_CHROMA,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_LAB
},
{ GIMP_LAYER_MODE_LCH_COLOR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_LAB
},
{ GIMP_LAYER_MODE_LCH_LIGHTNESS,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_LAB
},
{ GIMP_LAYER_MODE_NORMAL_LINEAR,
"gimp:normal",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_OVER,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_BEHIND_LINEAR,
"gimp:behind",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_OVER,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_MULTIPLY,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_MULTIPLY_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_SCREEN,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_SCREEN_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_DIFFERENCE,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_DIFFERENCE_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_ADDITION,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_ADDITION_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_SUBTRACT,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_SUBTRACT_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_DARKEN_ONLY,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_LIGHTEN_ONLY,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_HSV_HUE,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_HSV_SATURATION,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_HSV_COLOR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_HSV_VALUE,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_DIVIDE,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_DIVIDE_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_DODGE,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_DODGE_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_BURN,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_BURN_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_HARDLIGHT,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_HARDLIGHT_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_SOFTLIGHT,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_SOFTLIGHT_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_GRAIN_EXTRACT,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_GRAIN_MERGE,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_VIVID_LIGHT,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_PIN_LIGHT,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_PIN_LIGHT_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_LINEAR_LIGHT,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_EXCLUSION,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_EXCLUSION_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_LINEAR_BURN,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_LINEAR_BURN_LINEAR,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_LUMA_DARKEN_ONLY,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_LUMINANCE_DARKEN_ONLY,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
},
{ GIMP_LAYER_MODE_LUMINANCE_LIGHTEN_ONLY,
"gimp:layer-mode",
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_ERASE,
"gimp:erase",
0,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_REPLACE,
"gimp:replace",
0,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
{ GIMP_LAYER_MODE_ANTI_ERASE,
"gimp:anti-erase",
0,
GIMP_LAYER_COMPOSITE_SRC_ATOP,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
},
};
const GimpLayerModeInfo *gimp_layer_mode_info (GimpLayerMode mode)
{
int i;
for (i = 0; i < sizeof (gimp_layer_mode_infos) / sizeof (gimp_layer_mode_infos[0]); i++)
{
if (gimp_layer_mode_infos[i].layer_mode == mode)
return &gimp_layer_mode_infos[i];
}
return NULL;
}
......@@ -48,6 +48,27 @@ struct _GimpOperationLayerModeClass
GimpLayerModeAffectMask (* get_affect_mask) (GimpOperationLayerMode *layer_mode);
};
typedef struct _GimpLayerModeInfo GimpLayerModeInfo;
typedef enum GimpLayerModeFlags {
GIMP_LAYER_MODE_FLAG_LEGACY = (1<<0),
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA = (1<<1)
} GimpLayerModeFlags;
struct _GimpLayerModeInfo
{
GimpLayerMode layer_mode;
gchar *op_name;
GimpLayerModeFlags flags;
GimpLayerCompositeMode composite_mode;
GimpLayerColorSpace composite_space;
GimpLayerColorSpace blend_space;
};
const GimpLayerModeInfo *gimp_layer_mode_info (GimpLayerMode mode);
struct _GimpOperationLayerMode
{
GeglOperationPointComposer3 parent_instance;
......
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