app: implement non-legacy blend modes in GimpOperationLayerMode
For operations needing to override default behavior sub-classes should still be used. This commit also enables pinligh, vividlight and linearlight blend mode modes
This commit is contained in:
@ -352,6 +352,16 @@ gimp_layer_mode_get_type (void)
|
||||
{ GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR, "GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR", "grain-extract-linear" },
|
||||
{ GIMP_LAYER_MODE_GRAIN_MERGE, "GIMP_LAYER_MODE_GRAIN_MERGE", "grain-merge" },
|
||||
{ GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR, "GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR", "grain-merge-linear" },
|
||||
{ GIMP_LAYER_MODE_VIVID_LIGHT, "GIMP_LAYER_MODE_VIVID_LIGHT", "vivid-light" },
|
||||
{ GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR, "GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR", "vivid-light-linear" },
|
||||
{ GIMP_LAYER_MODE_PIN_LIGHT, "GIMP_LAYER_MODE_PIN_LIGHT", "pin-light" },
|
||||
{ GIMP_LAYER_MODE_PIN_LIGHT_LINEAR, "GIMP_LAYER_MODE_PIN_LIGHT_LINEAR", "pin-light-linear" },
|
||||
{ GIMP_LAYER_MODE_LINEAR_LIGHT, "GIMP_LAYER_MODE_LINEAR_LIGHT", "linear-light" },
|
||||
{ GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR, "GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR", "linear-light-linear" },
|
||||
{ GIMP_LAYER_MODE_EXCLUSION, "GIMP_LAYER_MODE_EXCLUSION", "exclusion" },
|
||||
{ GIMP_LAYER_MODE_EXCLUSION_LINEAR, "GIMP_LAYER_MODE_EXCLUSION_LINEAR", "exclusion-linear" },
|
||||
{ GIMP_LAYER_MODE_LINEAR_BURN, "GIMP_LAYER_MODE_LINEAR_BURN", "linear-burn" },
|
||||
{ GIMP_LAYER_MODE_LINEAR_BURN_LINEAR, "GIMP_LAYER_MODE_LINEAR_BURN_LINEAR", "linear-burn-linear" },
|
||||
{ GIMP_LAYER_MODE_ERASE, "GIMP_LAYER_MODE_ERASE", "erase" },
|
||||
{ GIMP_LAYER_MODE_REPLACE, "GIMP_LAYER_MODE_REPLACE", "replace" },
|
||||
{ GIMP_LAYER_MODE_ANTI_ERASE, "GIMP_LAYER_MODE_ANTI_ERASE", "anti-erase" },
|
||||
@ -423,6 +433,16 @@ gimp_layer_mode_get_type (void)
|
||||
{ GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR, NC_("layer-mode", "Grain extract (linear)"), NULL },
|
||||
{ GIMP_LAYER_MODE_GRAIN_MERGE, NC_("layer-mode", "Grain merge"), NULL },
|
||||
{ GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR, NC_("layer-mode", "Grain merge (linear)"), NULL },
|
||||
{ GIMP_LAYER_MODE_VIVID_LIGHT, NC_("layer-mode", "Vivid light"), NULL },
|
||||
{ GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR, NC_("layer-mode", "Vivid light (linear)"), NULL },
|
||||
{ GIMP_LAYER_MODE_PIN_LIGHT, NC_("layer-mode", "Pin light"), NULL },
|
||||
{ GIMP_LAYER_MODE_PIN_LIGHT_LINEAR, NC_("layer-mode", "Pin light (linear)"), NULL },
|
||||
{ GIMP_LAYER_MODE_LINEAR_LIGHT, NC_("layer-mode", "Linear light"), NULL },
|
||||
{ GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR, NC_("layer-mode", "Linear light (linear)"), NULL },
|
||||
{ GIMP_LAYER_MODE_EXCLUSION, NC_("layer-mode", "Exclusion"), NULL },
|
||||
{ GIMP_LAYER_MODE_EXCLUSION_LINEAR, NC_("layer-mode", "Exclusion (linear)"), NULL },
|
||||
{ GIMP_LAYER_MODE_LINEAR_BURN, NC_("layer-mode", "Linear light"), NULL },
|
||||
{ GIMP_LAYER_MODE_LINEAR_BURN_LINEAR, NC_("layer-mode", "Linear burn (linear)"), NULL },
|
||||
{ GIMP_LAYER_MODE_ERASE, NC_("layer-mode", "Erase"), NULL },
|
||||
{ GIMP_LAYER_MODE_REPLACE, NC_("layer-mode", "Replace"), NULL },
|
||||
{ GIMP_LAYER_MODE_ANTI_ERASE, NC_("layer-mode", "Anti erase"), NULL },
|
||||
|
@ -222,6 +222,16 @@ typedef enum
|
||||
GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR, /*< desc="Grain extract (linear)" >*/
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE, /*< desc="Grain merge" >*/
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR, /*< desc="Grain merge (linear)" >*/
|
||||
GIMP_LAYER_MODE_VIVID_LIGHT, /*< desc="Vivid light" >*/
|
||||
GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR, /*< desc="Vivid light (linear)" >*/
|
||||
GIMP_LAYER_MODE_PIN_LIGHT, /*< desc="Pin light" >*/
|
||||
GIMP_LAYER_MODE_PIN_LIGHT_LINEAR, /*< desc="Pin light (linear)" >*/
|
||||
GIMP_LAYER_MODE_LINEAR_LIGHT, /*< desc="Linear light" >*/
|
||||
GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR, /*< desc="Linear light (linear)" >*/
|
||||
GIMP_LAYER_MODE_EXCLUSION, /*< desc="Exclusion" >*/
|
||||
GIMP_LAYER_MODE_EXCLUSION_LINEAR, /*< desc="Exclusion (linear)" >*/
|
||||
GIMP_LAYER_MODE_LINEAR_BURN, /*< desc="Linear light" >*/
|
||||
GIMP_LAYER_MODE_LINEAR_BURN_LINEAR, /*< desc="Linear burn (linear)" >*/
|
||||
|
||||
/* Internal modes, not available to the PDB */
|
||||
GIMP_LAYER_MODE_ERASE = 1000, /*< pdb-skip, desc="Erase" >*/
|
||||
|
@ -128,6 +128,11 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
|
||||
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 TRUE;
|
||||
|
||||
case GIMP_LAYER_MODE_BEHIND_LINEAR:
|
||||
@ -146,6 +151,11 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
|
||||
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
|
||||
case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_PIN_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_EXCLUSION_LINEAR:
|
||||
case GIMP_LAYER_MODE_LINEAR_BURN_LINEAR:
|
||||
return TRUE;
|
||||
|
||||
case GIMP_LAYER_MODE_ERASE:
|
||||
@ -158,7 +168,7 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GimpLayerColorSpace
|
||||
@ -227,6 +237,11 @@ gimp_layer_mode_get_blend_space (GimpLayerMode mode)
|
||||
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_COLOR_SPACE_RGB_PERCEPTUAL;
|
||||
|
||||
case GIMP_LAYER_MODE_BEHIND_LINEAR:
|
||||
@ -245,6 +260,11 @@ gimp_layer_mode_get_blend_space (GimpLayerMode mode)
|
||||
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
|
||||
case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_PIN_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_EXCLUSION_LINEAR:
|
||||
case GIMP_LAYER_MODE_LINEAR_BURN_LINEAR:
|
||||
return GIMP_LAYER_COLOR_SPACE_RGB_LINEAR;
|
||||
|
||||
case GIMP_LAYER_MODE_ERASE:
|
||||
@ -328,6 +348,11 @@ gimp_layer_mode_get_composite_mode (GimpLayerMode mode)
|
||||
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:
|
||||
@ -346,6 +371,11 @@ gimp_layer_mode_get_composite_mode (GimpLayerMode mode)
|
||||
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
|
||||
case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_PIN_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR:
|
||||
case GIMP_LAYER_MODE_EXCLUSION_LINEAR:
|
||||
case GIMP_LAYER_MODE_LINEAR_BURN_LINEAR:
|
||||
return GIMP_LAYER_COMPOSITE_SRC_ATOP;
|
||||
|
||||
case GIMP_LAYER_MODE_ERASE:
|
||||
@ -376,147 +406,64 @@ gimp_layer_mode_get_operation (GimpLayerMode mode)
|
||||
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
|
||||
return "gimp:multiply-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_MULTIPLY:
|
||||
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
|
||||
return "gimp:multiply";
|
||||
|
||||
case GIMP_LAYER_MODE_SCREEN_LEGACY:
|
||||
return "gimp:screen-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_SCREEN:
|
||||
case GIMP_LAYER_MODE_SCREEN_LINEAR:
|
||||
return "gimp:screen";
|
||||
|
||||
case GIMP_LAYER_MODE_OVERLAY_LEGACY:
|
||||
return "gimp:softlight-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_OVERLAY:
|
||||
case GIMP_LAYER_MODE_OVERLAY_LINEAR:
|
||||
return "gimp:overlay";
|
||||
return "gimp:softlight-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_DIFFERENCE_LEGACY:
|
||||
return "gimp:difference-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_DIFFERENCE:
|
||||
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
|
||||
return "gimp:difference";
|
||||
|
||||
case GIMP_LAYER_MODE_ADDITION_LEGACY:
|
||||
return "gimp:addition-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_ADDITION:
|
||||
case GIMP_LAYER_MODE_ADDITION_LINEAR:
|
||||
return "gimp:addition";
|
||||
|
||||
case GIMP_LAYER_MODE_SUBTRACT_LEGACY:
|
||||
return "gimp:subtract-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_SUBTRACT:
|
||||
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
|
||||
return "gimp:subtract";
|
||||
|
||||
case GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY:
|
||||
return "gimp:darken-only-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_DARKEN_ONLY:
|
||||
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
|
||||
return "gimp:darken-only";
|
||||
|
||||
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY:
|
||||
return "gimp:lighten-only-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
|
||||
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
|
||||
return "gimp:lighten-only";
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_HUE_LEGACY:
|
||||
return "gimp:hsv-hue-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_HUE:
|
||||
return "gimp:hsv-hue";
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_SATURATION_LEGACY:
|
||||
return "gimp:hsv-saturation-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_SATURATION:
|
||||
return "gimp:hsv-saturation";
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_COLOR_LEGACY:
|
||||
return "gimp:hsv-color-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_COLOR:
|
||||
return "gimp:hsv-color";
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_VALUE_LEGACY:
|
||||
return "gimp:hsv-value-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_VALUE:
|
||||
return "gimp:hsv-value";
|
||||
|
||||
case GIMP_LAYER_MODE_DIVIDE_LEGACY:
|
||||
return "gimp:divide-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_DIVIDE:
|
||||
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
|
||||
return "gimp:divide";
|
||||
|
||||
case GIMP_LAYER_MODE_DODGE_LEGACY:
|
||||
return "gimp:dodge-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_DODGE:
|
||||
case GIMP_LAYER_MODE_DODGE_LINEAR:
|
||||
return "gimp:dodge";
|
||||
|
||||
case GIMP_LAYER_MODE_BURN_LEGACY:
|
||||
return "gimp:burn-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_BURN:
|
||||
case GIMP_LAYER_MODE_BURN_LINEAR:
|
||||
return "gimp:burn";
|
||||
|
||||
case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
|
||||
return "gimp:hardlight-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_HARDLIGHT:
|
||||
case GIMP_LAYER_MODE_HARDLIGHT_LINEAR:
|
||||
return "gimp:hardlight";
|
||||
|
||||
case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
|
||||
return "gimp:softlight-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_SOFTLIGHT:
|
||||
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
|
||||
return "gimp:softlight";
|
||||
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
|
||||
return "gimp:grain-extract-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
|
||||
return "gimp:grain-extract";
|
||||
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY:
|
||||
return "gimp:grain-merge-legacy";
|
||||
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE:
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
|
||||
return "gimp:grain-merge";
|
||||
|
||||
case GIMP_LAYER_MODE_COLOR_ERASE:
|
||||
return "gimp:color-erase";
|
||||
|
||||
case GIMP_LAYER_MODE_LCH_HUE:
|
||||
return "gimp:lch-hue";
|
||||
|
||||
case GIMP_LAYER_MODE_LCH_CHROMA:
|
||||
return "gimp:lch-chroma";
|
||||
|
||||
case GIMP_LAYER_MODE_LCH_COLOR:
|
||||
return "gimp:lch-color";
|
||||
|
||||
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
|
||||
return "gimp:lch-lightness";
|
||||
|
||||
case GIMP_LAYER_MODE_ERASE:
|
||||
return "gimp:erase";
|
||||
|
||||
@ -525,7 +472,8 @@ gimp_layer_mode_get_operation (GimpLayerMode mode)
|
||||
|
||||
case GIMP_LAYER_MODE_ANTI_ERASE:
|
||||
return "gimp:anti-erase";
|
||||
default:
|
||||
return "gimp:layer-mode";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return "gimp:layer-mode";
|
||||
}
|
||||
|
@ -84,36 +84,13 @@
|
||||
#include "layer-modes-legacy/gimpoperationsoftlightlegacy.h"
|
||||
#include "layer-modes-legacy/gimpoperationsubtractlegacy.h"
|
||||
|
||||
#include "layer-modes/gimpoperationaddition.h"
|
||||
#include "layer-modes/gimpoperationantierase.h"
|
||||
#include "layer-modes/gimpoperationbehind.h"
|
||||
#include "layer-modes/gimpoperationburn.h"
|
||||
#include "layer-modes/gimpoperationcolorerase.h"
|
||||
#include "layer-modes/gimpoperationdarkenonly.h"
|
||||
#include "layer-modes/gimpoperationdifference.h"
|
||||
#include "layer-modes/gimpoperationdissolve.h"
|
||||
#include "layer-modes/gimpoperationdivide.h"
|
||||
#include "layer-modes/gimpoperationdodge.h"
|
||||
#include "layer-modes/gimpoperationerase.h"
|
||||
#include "layer-modes/gimpoperationgrainextract.h"
|
||||
#include "layer-modes/gimpoperationgrainmerge.h"
|
||||
#include "layer-modes/gimpoperationhardlight.h"
|
||||
#include "layer-modes/gimpoperationhsvcolor.h"
|
||||
#include "layer-modes/gimpoperationhsvhue.h"
|
||||
#include "layer-modes/gimpoperationhsvsaturation.h"
|
||||
#include "layer-modes/gimpoperationhsvvalue.h"
|
||||
#include "layer-modes/gimpoperationlchchroma.h"
|
||||
#include "layer-modes/gimpoperationlchcolor.h"
|
||||
#include "layer-modes/gimpoperationlchhue.h"
|
||||
#include "layer-modes/gimpoperationlchlightness.h"
|
||||
#include "layer-modes/gimpoperationlightenonly.h"
|
||||
#include "layer-modes/gimpoperationmultiply.h"
|
||||
#include "layer-modes/gimpoperationcolorerase.h"
|
||||
#include "layer-modes/gimpoperationdissolve.h"
|
||||
#include "layer-modes/gimpoperationnormal.h"
|
||||
#include "layer-modes/gimpoperationoverlay.h"
|
||||
#include "layer-modes/gimpoperationreplace.h"
|
||||
#include "layer-modes/gimpoperationscreen.h"
|
||||
#include "layer-modes/gimpoperationsoftlight.h"
|
||||
#include "layer-modes/gimpoperationsubtract.h"
|
||||
|
||||
|
||||
void
|
||||
@ -150,48 +127,25 @@ gimp_operations_init (void)
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_NORMAL);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DISSOLVE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_OVERLAY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_HUE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_SATURATION);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_COLOR);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_VALUE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_HUE_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_SATURATION_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_COLOR_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_VALUE_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DODGE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_DODGE_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_BURN);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_BURN_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE_LEGACY);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_HUE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_CHROMA);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_COLOR);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_LIGHTNESS);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_ERASE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_REPLACE);
|
||||
g_type_class_ref (GIMP_TYPE_OPERATION_ANTI_ERASE);
|
||||
|
@ -24,67 +24,20 @@ libapplayermodes_generic_a_sources = \
|
||||
gimplayermodefunctions.h \
|
||||
gimpblendcomposite.h \
|
||||
\
|
||||
gimpoperationaddition.c \
|
||||
gimpoperationaddition.h \
|
||||
gimpoperationantierase.c \
|
||||
gimpoperationantierase.h \
|
||||
gimpoperationbehind.c \
|
||||
gimpoperationbehind.h \
|
||||
gimpoperationburn.c \
|
||||
gimpoperationburn.h \
|
||||
gimpoperationcolorerase.c \
|
||||
gimpoperationcolorerase.h \
|
||||
gimpoperationdarkenonly.c \
|
||||
gimpoperationdarkenonly.h \
|
||||
gimpoperationdifference.c \
|
||||
gimpoperationdifference.h \
|
||||
gimpoperationdissolve.c \
|
||||
gimpoperationdissolve.h \
|
||||
gimpoperationdivide.c \
|
||||
gimpoperationdivide.h \
|
||||
gimpoperationdodge.c \
|
||||
gimpoperationdodge.h \
|
||||
gimpoperationerase.c \
|
||||
gimpoperationerase.h \
|
||||
gimpoperationgrainextract.c \
|
||||
gimpoperationgrainextract.h \
|
||||
gimpoperationgrainmerge.c \
|
||||
gimpoperationgrainmerge.h \
|
||||
gimpoperationhardlight.c \
|
||||
gimpoperationhardlight.h \
|
||||
gimpoperationhsvcolor.c \
|
||||
gimpoperationhsvcolor.h \
|
||||
gimpoperationhsvhue.c \
|
||||
gimpoperationhsvhue.h \
|
||||
gimpoperationhsvsaturation.c \
|
||||
gimpoperationhsvsaturation.h \
|
||||
gimpoperationhsvvalue.c \
|
||||
gimpoperationhsvvalue.h \
|
||||
gimpoperationhsvvalue.h \
|
||||
gimpoperationlchchroma.c \
|
||||
gimpoperationlchchroma.h \
|
||||
gimpoperationlchcolor.c \
|
||||
gimpoperationlchcolor.h \
|
||||
gimpoperationlchhue.c \
|
||||
gimpoperationlchhue.h \
|
||||
gimpoperationlchlightness.c \
|
||||
gimpoperationlchlightness.h \
|
||||
gimpoperationlightenonly.c \
|
||||
gimpoperationlightenonly.h \
|
||||
gimpoperationmultiply.c \
|
||||
gimpoperationmultiply.h \
|
||||
gimpoperationnormal.c \
|
||||
gimpoperationnormal.h \
|
||||
gimpoperationoverlay.c \
|
||||
gimpoperationoverlay.h \
|
||||
gimpoperationreplace.c \
|
||||
gimpoperationreplace.h \
|
||||
gimpoperationscreen.c \
|
||||
gimpoperationscreen.h \
|
||||
gimpoperationsoftlight.c \
|
||||
gimpoperationsoftlight.h \
|
||||
gimpoperationsubtract.c \
|
||||
gimpoperationsubtract.h
|
||||
gimpoperationreplace.h
|
||||
|
||||
libapplayermodes_sse2_a_sources = \
|
||||
gimpoperationnormal-sse2.c
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -45,42 +45,19 @@
|
||||
#include "operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h"
|
||||
#include "operations/layer-modes-legacy/gimpoperationsubtractlegacy.h"
|
||||
|
||||
#include "gimpoperationaddition.h"
|
||||
#include "gimpoperationantierase.h"
|
||||
#include "gimpoperationbehind.h"
|
||||
#include "gimpoperationburn.h"
|
||||
#include "gimpoperationcolorerase.h"
|
||||
#include "gimpoperationdarkenonly.h"
|
||||
#include "gimpoperationdifference.h"
|
||||
#include "gimpoperationdissolve.h"
|
||||
#include "gimpoperationdivide.h"
|
||||
#include "gimpoperationdodge.h"
|
||||
#include "gimpoperationerase.h"
|
||||
#include "gimpoperationgrainextract.h"
|
||||
#include "gimpoperationgrainmerge.h"
|
||||
#include "gimpoperationhardlight.h"
|
||||
#include "gimpoperationhsvcolor.h"
|
||||
#include "gimpoperationhsvhue.h"
|
||||
#include "gimpoperationhsvsaturation.h"
|
||||
#include "gimpoperationhsvvalue.h"
|
||||
#include "gimpoperationlchchroma.h"
|
||||
#include "gimpoperationlchcolor.h"
|
||||
#include "gimpoperationlchhue.h"
|
||||
#include "gimpoperationlchlightness.h"
|
||||
#include "gimpoperationlightenonly.h"
|
||||
#include "gimpoperationmultiply.h"
|
||||
#include "gimpoperationnormal.h"
|
||||
#include "gimpoperationoverlay.h"
|
||||
#include "gimpoperationreplace.h"
|
||||
#include "gimpoperationscreen.h"
|
||||
#include "gimpoperationsoftlight.h"
|
||||
#include "gimpoperationsubtract.h"
|
||||
|
||||
|
||||
GimpLayerModeFunc
|
||||
gimp_get_layer_mode_function (GimpLayerMode paint_mode)
|
||||
{
|
||||
GimpLayerModeFunc func;
|
||||
GimpLayerModeFunc func = gimp_operation_layer_mode_process_pixels;
|
||||
|
||||
switch (paint_mode)
|
||||
{
|
||||
@ -102,19 +79,10 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
|
||||
func = gimp_operation_multiply_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_MULTIPLY:
|
||||
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
|
||||
func = gimp_operation_multiply_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_SCREEN_LEGACY:
|
||||
func = gimp_operation_screen_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_SCREEN:
|
||||
func = gimp_operation_screen_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_OVERLAY_LEGACY:
|
||||
func = gimp_operation_softlight_legacy_process;
|
||||
break;
|
||||
@ -123,75 +91,34 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
|
||||
func = gimp_operation_difference_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_DIFFERENCE:
|
||||
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
|
||||
func = gimp_operation_difference_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_ADDITION_LEGACY:
|
||||
func = gimp_operation_addition_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_ADDITION:
|
||||
case GIMP_LAYER_MODE_ADDITION_LINEAR:
|
||||
func = gimp_operation_addition_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_SUBTRACT_LEGACY:
|
||||
func = gimp_operation_subtract_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_SUBTRACT:
|
||||
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
|
||||
func = gimp_operation_subtract_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY:
|
||||
func = gimp_operation_darken_only_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_DARKEN_ONLY:
|
||||
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
|
||||
func = gimp_operation_darken_only_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY:
|
||||
func = gimp_operation_lighten_only_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
|
||||
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
|
||||
func = gimp_operation_lighten_only_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_HUE:
|
||||
func = gimp_operation_hsv_hue_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_HUE_LEGACY:
|
||||
func = gimp_operation_hsv_hue_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_SATURATION:
|
||||
func = gimp_operation_hsv_saturation_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_SATURATION_LEGACY:
|
||||
func = gimp_operation_hsv_saturation_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_COLOR:
|
||||
func = gimp_operation_hsv_color_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_COLOR_LEGACY:
|
||||
func = gimp_operation_hsv_color_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_VALUE:
|
||||
func = gimp_operation_hsv_value_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HSV_VALUE_LEGACY:
|
||||
func = gimp_operation_hsv_value_legacy_process;
|
||||
break;
|
||||
@ -200,87 +127,34 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
|
||||
func = gimp_operation_divide_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_DIVIDE:
|
||||
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
|
||||
func = gimp_operation_divide_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_DODGE_LEGACY:
|
||||
func = gimp_operation_dodge_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_DODGE:
|
||||
case GIMP_LAYER_MODE_DODGE_LINEAR:
|
||||
func = gimp_operation_dodge_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_BURN_LEGACY:
|
||||
func = gimp_operation_burn_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_BURN:
|
||||
case GIMP_LAYER_MODE_BURN_LINEAR:
|
||||
func = gimp_operation_burn_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
|
||||
func = gimp_operation_hardlight_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_HARDLIGHT:
|
||||
func = gimp_operation_hardlight_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
|
||||
func = gimp_operation_softlight_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_SOFTLIGHT:
|
||||
func = gimp_operation_softlight_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
|
||||
func = gimp_operation_grain_extract_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
|
||||
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
|
||||
func = gimp_operation_grain_extract_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY:
|
||||
func = gimp_operation_grain_merge_legacy_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE:
|
||||
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
|
||||
func = gimp_operation_grain_merge_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_COLOR_ERASE:
|
||||
func = gimp_operation_color_erase_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_OVERLAY:
|
||||
func = gimp_operation_overlay_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_LCH_HUE:
|
||||
func = gimp_operation_lch_hue_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_LCH_CHROMA:
|
||||
func = gimp_operation_lch_chroma_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_LCH_COLOR:
|
||||
func = gimp_operation_lch_color_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
|
||||
func = gimp_operation_lch_lightness_process;
|
||||
break;
|
||||
|
||||
case GIMP_LAYER_MODE_ERASE:
|
||||
func = gimp_operation_erase_process;
|
||||
break;
|
||||
@ -294,9 +168,6 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("No direct function for layer mode (%d), using gimp:normal",
|
||||
paint_mode);
|
||||
func = gimp_operation_normal_process;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,73 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationadditionmode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationaddition.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationAddition, gimp_operation_addition,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_addition_class_init (GimpOperationAdditionClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:addition",
|
||||
"description", "GIMP addition mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_addition_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_addition_init (GimpOperationAddition *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_addition_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_addition);
|
||||
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationaddition.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_ADDITION_H__
|
||||
#define __GIMP_OPERATION_ADDITION_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_ADDITION (gimp_operation_addition_get_type ())
|
||||
#define GIMP_OPERATION_ADDITION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_ADDITION, GimpOperationAddition))
|
||||
#define GIMP_OPERATION_ADDITION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_ADDITION, GimpOperationAdditionClass))
|
||||
#define GIMP_IS_OPERATION_ADDITION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_ADDITION))
|
||||
#define GIMP_IS_OPERATION_ADDITION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_ADDITION))
|
||||
#define GIMP_OPERATION_ADDITION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_ADDITION, GimpOperationAdditionClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationAddition GimpOperationAddition;
|
||||
typedef struct _GimpOperationAdditionClass GimpOperationAdditionClass;
|
||||
|
||||
struct _GimpOperationAddition
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationAdditionClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_addition_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_addition_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_ADDITION_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationburnmode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationburn.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationBurn, gimp_operation_burn,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_burn_class_init (GimpOperationBurnClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:burn",
|
||||
"description", "GIMP burn mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_burn_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_burn_init (GimpOperationBurn *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_burn_process (GeglOperation *operation,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (operation, in, layer, mask, out, samples,
|
||||
blendfun_burn);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationburn.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_BURN_H__
|
||||
#define __GIMP_OPERATION_BURN_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_BURN (gimp_operation_burn_get_type ())
|
||||
#define GIMP_OPERATION_BURN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_BURN, GimpOperationBurn))
|
||||
#define GIMP_OPERATION_BURN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_BURN, GimpOperationBurnClass))
|
||||
#define GIMP_IS_OPERATION_BURN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_BURN))
|
||||
#define GIMP_IS_OPERATION_BURN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_BURN))
|
||||
#define GIMP_OPERATION_BURN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_BURN, GimpOperationBurnClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationBurn GimpOperationBurn;
|
||||
typedef struct _GimpOperationBurnClass GimpOperationBurnClass;
|
||||
|
||||
struct _GimpOperationBurn
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationBurnClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_burn_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_burn_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_BURN_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationdarkenonlymode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationdarkenonly.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationDarkenOnly, gimp_operation_darken_only,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_darken_only_class_init (GimpOperationDarkenOnlyClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:darken-only",
|
||||
"description", "GIMP darken only mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_darken_only_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_darken_only_init (GimpOperationDarkenOnly *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_darken_only_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_darken_only);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationdarkenonly.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_DARKEN_ONLY_H__
|
||||
#define __GIMP_OPERATION_DARKEN_ONLY_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_DARKEN_ONLY (gimp_operation_darken_only_get_type ())
|
||||
#define GIMP_OPERATION_DARKEN_ONLY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE, GimpOperationDarkenOnly))
|
||||
#define GIMP_OPERATION_DARKEN_ONLY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE, GimpOperationDarkenOnlyClass))
|
||||
#define GIMP_IS_OPERATION_DARKEN_ONLY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE))
|
||||
#define GIMP_IS_OPERATION_DARKEN_ONLY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE))
|
||||
#define GIMP_OPERATION_DARKEN_ONLY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DARKEN_ONLY_MODE, GimpOperationDarkenOnlyClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationDarkenOnly GimpOperationDarkenOnly;
|
||||
typedef struct _GimpOperationDarkenOnlyClass GimpOperationDarkenOnlyClass;
|
||||
|
||||
struct _GimpOperationDarkenOnly
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationDarkenOnlyClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_darken_only_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_darken_only_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_DARKEN_ONLY_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationdifferencemode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationdifference.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationDifference, gimp_operation_difference,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_difference_class_init (GimpOperationDifferenceClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:difference",
|
||||
"description", "GIMP difference mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_difference_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_difference_init (GimpOperationDifference *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_difference_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_difference);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationdifference.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_DIFFERENCE_H__
|
||||
#define __GIMP_OPERATION_DIFFERENCE_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_DIFFERENCE (gimp_operation_difference_get_type ())
|
||||
#define GIMP_OPERATION_DIFFERENCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DIFFERENCE, GimpOperationDifference))
|
||||
#define GIMP_OPERATION_DIFFERENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DIFFERENCE, GimpOperationDifferenceClass))
|
||||
#define GIMP_IS_OPERATION_DIFFERENCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DIFFERENCE))
|
||||
#define GIMP_IS_OPERATION_DIFFERENCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DIFFERENCE))
|
||||
#define GIMP_OPERATION_DIFFERENCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DIFFERENCE, GimpOperationDifferenceClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationDifference GimpOperationDifference;
|
||||
typedef struct _GimpOperationDifferenceClass GimpOperationDifferenceClass;
|
||||
|
||||
struct _GimpOperationDifference
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationDifferenceClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_difference_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_difference_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_DIFFERENCE_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationdividemode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationdivide.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationDivide, gimp_operation_divide,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_divide_class_init (GimpOperationDivideClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:divide",
|
||||
"description", "GIMP divide mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_divide_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_divide_init (GimpOperationDivide *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_divide_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_divide);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationdivide.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_DIVIDE_H__
|
||||
#define __GIMP_OPERATION_DIVIDE_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_DIVIDE (gimp_operation_divide_get_type ())
|
||||
#define GIMP_OPERATION_DIVIDE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DIVIDE, GimpOperationDivide))
|
||||
#define GIMP_OPERATION_DIVIDE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DIVIDE, GimpOperationDivideClass))
|
||||
#define GIMP_IS_OPERATION_DIVIDE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DIVIDE))
|
||||
#define GIMP_IS_OPERATION_DIVIDE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DIVIDE))
|
||||
#define GIMP_OPERATION_DIVIDE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DIVIDE, GimpOperationDivideClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationDivide GimpOperationDivide;
|
||||
typedef struct _GimpOperationDivideClass GimpOperationDivideClass;
|
||||
|
||||
struct _GimpOperationDivide
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationDivideClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_divide_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_divide_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_DIVIDE_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationdodge.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "operations/operations-types.h"
|
||||
|
||||
#include "gimpoperationdodge.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationDodge, gimp_operation_dodge,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_dodge_class_init (GimpOperationDodgeClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:dodge",
|
||||
"description", "GIMP dodge mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_dodge_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_dodge_init (GimpOperationDodge *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_dodge_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_dodge);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationdodge.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_DODGE_H__
|
||||
#define __GIMP_OPERATION_DODGE_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_DODGE (gimp_operation_dodge_get_type ())
|
||||
#define GIMP_OPERATION_DODGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_DODGE, GimpOperationDodge))
|
||||
#define GIMP_OPERATION_DODGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_DODGE, GimpOperationDodgeClass))
|
||||
#define GIMP_IS_OPERATION_DODGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_DODGE))
|
||||
#define GIMP_IS_OPERATION_DODGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_DODGE))
|
||||
#define GIMP_OPERATION_DODGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_DODGE, GimpOperationDodgeClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationDodge GimpOperationDodge;
|
||||
typedef struct _GimpOperationDodgeClass GimpOperationDodgeClass;
|
||||
|
||||
struct _GimpOperationDodge
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationDodgeClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_dodge_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_dodge_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_DODGE_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationgrainextractmode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationgrainextract.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationGrainExtract, gimp_operation_grain_extract,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_grain_extract_class_init (GimpOperationGrainExtractClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:grain-extract",
|
||||
"description", "GIMP grain extract mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_grain_extract_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_grain_extract_init (GimpOperationGrainExtract *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_grain_extract_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_grain_extract);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationgrainextract.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_GRAIN_EXTRACT_H__
|
||||
#define __GIMP_OPERATION_GRAIN_EXTRACT_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_GRAIN_EXTRACT (gimp_operation_grain_extract_get_type ())
|
||||
#define GIMP_OPERATION_GRAIN_EXTRACT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_GRAIN_EXTRACT, GimpOperationGrainExtract))
|
||||
#define GIMP_OPERATION_GRAIN_EXTRACT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_GRAIN_EXTRACT, GimpOperationGrainExtractClass))
|
||||
#define GIMP_IS_OPERATION_GRAIN_EXTRACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_GRAIN_EXTRACT))
|
||||
#define GIMP_IS_OPERATION_GRAIN_EXTRACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_GRAIN_EXTRACT))
|
||||
#define GIMP_OPERATION_GRAIN_EXTRACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_GRAIN_EXTRACT, GimpOperationGrainExtractClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationGrainExtract GimpOperationGrainExtract;
|
||||
typedef struct _GimpOperationGrainExtractClass GimpOperationGrainExtractClass;
|
||||
|
||||
struct _GimpOperationGrainExtract
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationGrainExtractClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_grain_extract_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_grain_extract_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_GRAIN_EXTRACT_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationgrainmergemode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationgrainmerge.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationGrainMerge, gimp_operation_grain_merge,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_grain_merge_class_init (GimpOperationGrainMergeClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:grain-merge",
|
||||
"description", "GIMP grain merge mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_grain_merge_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_grain_merge_init (GimpOperationGrainMerge *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_grain_merge_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_grain_merge);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationgrainmerge.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_GRAIN_MERGE_H__
|
||||
#define __GIMP_OPERATION_GRAIN_MERGE_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_GRAIN_MERGE (gimp_operation_grain_merge_get_type ())
|
||||
#define GIMP_OPERATION_GRAIN_MERGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_GRAIN_MERGE, GimpOperationGrainMerge))
|
||||
#define GIMP_OPERATION_GRAIN_MERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_GRAIN_MERGE, GimpOperationGrainMergeClass))
|
||||
#define GIMP_IS_OPERATION_GRAIN_MERGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_GRAIN_MERGE))
|
||||
#define GIMP_IS_OPERATION_GRAIN_MERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_GRAIN_MERGE))
|
||||
#define GIMP_OPERATION_GRAIN_MERGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_GRAIN_MERGE, GimpOperationGrainMergeClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationGrainMerge GimpOperationGrainMerge;
|
||||
typedef struct _GimpOperationGrainMergeClass GimpOperationGrainMergeClass;
|
||||
|
||||
struct _GimpOperationGrainMerge
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationGrainMergeClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_grain_merge_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_grain_merge_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_GRAIN_MERGE_H__ */
|
@ -1,71 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationhardlightmode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationhardlight.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationHardlight, gimp_operation_hardlight,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_hardlight_class_init (GimpOperationHardlightClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:hardlight",
|
||||
"description", "GIMP hardlight mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_hardlight_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_hardlight_init (GimpOperationHardlight *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_hardlight_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_hardlight);
|
||||
return TRUE;
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationhardlight.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_HARDLIGHT_H__
|
||||
#define __GIMP_OPERATION_HARDLIGHT_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_HARDLIGHT (gimp_operation_hardlight_get_type ())
|
||||
#define GIMP_OPERATION_HARDLIGHT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_HARDLIGHT, GimpOperationHardlight))
|
||||
#define GIMP_OPERATION_HARDLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_HARDLIGHT, GimpOperationHardlightClass))
|
||||
#define GIMP_IS_OPERATION_HARDLIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_HARDLIGHT))
|
||||
#define GIMP_IS_OPERATION_HARDLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_HARDLIGHT))
|
||||
#define GIMP_OPERATION_HARDLIGHT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_HARDLIGHT, GimpOperationHardlightClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationHardlight GimpOperationHardlight;
|
||||
typedef struct _GimpOperationHardlightClass GimpOperationHardlightClass;
|
||||
|
||||
struct _GimpOperationHardlight
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationHardlightClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_hardlight_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_hardlight_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_HARDLIGHT_H__ */
|
@ -1,76 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationcolormode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
#include <cairo.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationhsvcolor.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationHsvColor, gimp_operation_hsv_color,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_hsv_color_class_init (GimpOperationHsvColorClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:hsv-color",
|
||||
"description", "GIMP color mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_hsv_color_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_hsv_color_init (GimpOperationHsvColor *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_hsv_color_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_hsv_color);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationhsvcolor.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_HSV_COLOR_H__
|
||||
#define __GIMP_OPERATION_HSV_COLOR_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_HSV_COLOR (gimp_operation_hsv_color_get_type ())
|
||||
#define GIMP_OPERATION_HSV_COLOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_COLOR, GimpOperationHsvColor))
|
||||
#define GIMP_OPERATION_HSV_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_COLOR, GimpOperationHsvColorClass))
|
||||
#define GIMP_IS_OPERATION_HSV_COLOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_COLOR))
|
||||
#define GIMP_IS_OPERATION_HSV_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_COLOR))
|
||||
#define GIMP_OPERATION_HSV_COLOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_COLOR, GimpOperationHsvColorClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationHsvColor GimpOperationHsvColor;
|
||||
typedef struct _GimpOperationHsvColorClass GimpOperationHsvColorClass;
|
||||
|
||||
struct _GimpOperationHsvColor
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationHsvColorClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_hsv_color_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_hsv_color_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_HSV_COLOR_H__ */
|
@ -1,76 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationhuemode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <cairo.h>
|
||||
#include <gegl-plugin.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationhsvhue.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationHsvHue, gimp_operation_hsv_hue,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_hsv_hue_class_init (GimpOperationHsvHueClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:hsv-hue",
|
||||
"description", "GIMP hue mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_hsv_hue_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_hsv_hue_init (GimpOperationHsvHue *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_hsv_hue_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_hsv_hue);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationhsvhue.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_HSV_HUE_H__
|
||||
#define __GIMP_OPERATION_HSV_HUE_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_HSV_HUE (gimp_operation_hsv_hue_get_type ())
|
||||
#define GIMP_OPERATION_HUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_HSV_HUE_MODE, GimpOperationHsvHue))
|
||||
#define GIMP_OPERATION_HUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_HSV_HUE_MODE, GimpOperationHsvHueClass))
|
||||
#define GIMP_IS_OPERATION_HUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_HSV_HUE_MODE))
|
||||
#define GIMP_IS_OPERATION_HUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_HSV_HUE_MODE))
|
||||
#define GIMP_OPERATION_HUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_HSV_HUE_MODE, GimpOperationHsvHueClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationHsvHue GimpOperationHsvHue;
|
||||
typedef struct _GimpOperationHsvHueClass GimpOperationHsvHueClass;
|
||||
|
||||
struct _GimpOperationHsvHue
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationHsvHueClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_hsv_hue_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_hsv_hue_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_HSV_HUE_H__ */
|
@ -1,76 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationsaturationmode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
#include <cairo.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationhsvsaturation.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationHsvSaturation, gimp_operation_hsv_saturation,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_hsv_saturation_class_init (GimpOperationHsvSaturationClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:hsv-saturation",
|
||||
"description", "GIMP saturation mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_hsv_saturation_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_hsv_saturation_init (GimpOperationHsvSaturation *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_hsv_saturation_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_hsv_saturation);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationhsvsaturation.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_HSV_SATURATION_H__
|
||||
#define __GIMP_OPERATION_HSV_SATURATION_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_HSV_SATURATION (gimp_operation_hsv_saturation_get_type ())
|
||||
#define GIMP_OPERATION_HSV_SATURATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_HSV_SATURATION, GimpOperationHsvSaturation))
|
||||
#define GIMP_OPERATION_HSV_SATURATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_HSV_SATURATION, GimpOperationHsvSaturationClass))
|
||||
#define GIMP_IS_OPERATION_HSV_SATURATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_HSV_SATURATION))
|
||||
#define GIMP_IS_OPERATION_HSV_SATURATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_HSV_SATURATION))
|
||||
#define GIMP_OPERATION_HSV_SATURATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_HSV_SATURATION, GimpOperationHsvSaturationClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationHsvSaturation GimpOperationHsvSaturation;
|
||||
typedef struct _GimpOperationHsvSaturationClass GimpOperationHsvSaturationClass;
|
||||
|
||||
struct _GimpOperationHsvSaturation
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationHsvSaturationClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_hsv_saturation_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_hsv_saturation_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_HSV_SATURATION_H__ */
|
@ -1,76 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationvaluemode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
#include <cairo.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationhsvvalue.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationHsvValue, gimp_operation_hsv_value,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_hsv_value_class_init (GimpOperationHsvValueClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:hsv-value",
|
||||
"description", "GIMP value mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_hsv_value_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_hsv_value_init (GimpOperationHsvValue *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_hsv_value_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_hsv_value);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationhsvvalue.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_HSV_VALUE_H__
|
||||
#define __GIMP_OPERATION_HSV_VALUE_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_HSV_VALUE (gimp_operation_hsv_value_get_type ())
|
||||
#define GIMP_OPERATION_HSV_VALUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_VALUE, GimpOperationHsvValue))
|
||||
#define GIMP_OPERATION_HSV_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_VALUE, GimpOperationHsvValueClass))
|
||||
#define GIMP_IS_OPERATION_HSV_VALUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_VALUE))
|
||||
#define GIMP_IS_OPERATION_HSV_VALUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_VALUE))
|
||||
#define GIMP_OPERATION_HSV_VALUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_VALUE, GimpOperationHsvValueClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationHsvValue GimpOperationHsvValue;
|
||||
typedef struct _GimpOperationHsvValueClass GimpOperationHsvValueClass;
|
||||
|
||||
struct _GimpOperationHsvValue
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationHsvValueClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_hsv_value_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_hsv_value_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_HSV_VALUE_H__ */
|
File diff suppressed because it is too large
Load Diff
@ -56,5 +56,14 @@ struct _GimpOperationLayerMode
|
||||
|
||||
GType gimp_operation_layer_mode_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean
|
||||
gimp_operation_layer_mode_process_pixels (GeglOperation *operation,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
#endif /* __GIMP_OPERATION_LAYER_MODE_H__ */
|
||||
|
@ -1,75 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlchchroma.c
|
||||
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
|
||||
* Massimo Valentini <mvalentini@src.gnome.org>
|
||||
* Thomas Manni <thomas.manni@free.fr>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationlchchroma.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationLchChroma, gimp_operation_lch_chroma,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_lch_chroma_class_init (GimpOperationLchChromaClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
operation_class->want_in_place = FALSE;
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:lch-chroma",
|
||||
"description", "GIMP LCH chroma mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_lch_chroma_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_lch_chroma_init (GimpOperationLchChroma *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_lch_chroma_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_lch_chroma);
|
||||
return TRUE;
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlchchroma.h
|
||||
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
|
||||
* Massimo Valentini <mvalentini@src.gnome.org>
|
||||
* Thomas Manni <thomas.manni@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_LCH_CHROMA_H__
|
||||
#define __GIMP_OPERATION_LCH_CHROMA_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_LCH_CHROMA (gimp_operation_lch_chroma_get_type ())
|
||||
#define GIMP_OPERATION_LCH_CHROMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LCH_CHROMA, GimpOperationLchChroma))
|
||||
#define GIMP_OPERATION_LCH_CHROMA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LCH_CHROMA, GimpOperationLchChromaClass))
|
||||
#define GIMP_IS_OPERATION_LCH_CHROMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LCH_CHROMA))
|
||||
#define GIMP_IS_OPERATION_LCH_CHROMA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LCH_CHROMA))
|
||||
#define GIMP_OPERATION_LCH_CHROMA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LCH_CHROMA, GimpOperationLchChromaClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationLchChroma GimpOperationLchChroma;
|
||||
typedef struct _GimpOperationLchChromaClass GimpOperationLchChromaClass;
|
||||
|
||||
struct _GimpOperationLchChroma
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationLchChromaClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_lch_chroma_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_lch_chroma_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_LCH_CHROMA_H__ */
|
@ -1,75 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlchcolor.c
|
||||
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
|
||||
* Massimo Valentini <mvalentini@src.gnome.org>
|
||||
* Thomas Manni <thomas.manni@free.fr>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationlchcolor.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationLchColor, gimp_operation_lch_color,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_lch_color_class_init (GimpOperationLchColorClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
operation_class->want_in_place = FALSE;
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:lch-color",
|
||||
"description", "GIMP LCH color mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_lch_color_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_lch_color_init (GimpOperationLchColor *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_lch_color_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_lch_color);
|
||||
return TRUE;
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlchcolor.h
|
||||
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
|
||||
* Massimo Valentini <mvalentini@src.gnome.org>
|
||||
* Thomas Manni <thomas.manni@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_LCH_COLOR_H__
|
||||
#define __GIMP_OPERATION_LCH_COLOR_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_LCH_COLOR (gimp_operation_lch_color_get_type ())
|
||||
#define GIMP_OPERATION_LCH_COLOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LCH_COLOR, GimpOperationLchColor))
|
||||
#define GIMP_OPERATION_LCH_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LCH_COLOR, GimpOperationLchColorClass))
|
||||
#define GIMP_IS_OPERATION_LCH_COLOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LCH_COLOR))
|
||||
#define GIMP_IS_OPERATION_LCH_COLOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LCH_COLOR))
|
||||
#define GIMP_OPERATION_LCH_COLOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LCH_COLOR, GimpOperationLchColorClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationLchColor GimpOperationLchColor;
|
||||
typedef struct _GimpOperationLchColorClass GimpOperationLchColorClass;
|
||||
|
||||
struct _GimpOperationLchColor
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationLchColorClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_lch_color_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_lch_color_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_LCH_COLOR_H__ */
|
@ -1,75 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlchhue.c
|
||||
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
|
||||
* Massimo Valentini <mvalentini@src.gnome.org>
|
||||
* Thomas Manni <thomas.manni@free.fr>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationlchhue.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationLchHue, gimp_operation_lch_hue,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_lch_hue_class_init (GimpOperationLchHueClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
operation_class->want_in_place = FALSE;
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:lch-hue",
|
||||
"description", "GIMP LCH hue mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_lch_hue_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_lch_hue_init (GimpOperationLchHue *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_lch_hue_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_lch_hue);
|
||||
return TRUE;
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlchhue.h
|
||||
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
|
||||
* Massimo Valentini <mvalentini@src.gnome.org>
|
||||
* Thomas Manni <thomas.manni@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_LCH_HUE_H__
|
||||
#define __GIMP_OPERATION_LCH_HUE_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_LCH_HUE (gimp_operation_lch_hue_get_type ())
|
||||
#define GIMP_OPERATION_LCH_HUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LCH_HUE, GimpOperationLchHue))
|
||||
#define GIMP_OPERATION_LCH_HUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LCH_HUE, GimpOperationLchHueClass))
|
||||
#define GIMP_IS_OPERATION_LCH_HUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LCH_HUE))
|
||||
#define GIMP_IS_OPERATION_LCH_HUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LCH_HUE))
|
||||
#define GIMP_OPERATION_LCH_HUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LCH_HUE, GimpOperationLchHueClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationLchHue GimpOperationLchHue;
|
||||
typedef struct _GimpOperationLchHueClass GimpOperationLchHueClass;
|
||||
|
||||
struct _GimpOperationLchHue
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationLchHueClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_lch_hue_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_lch_hue_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_LCH_HUE_H__ */
|
@ -1,75 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlchlightness.c
|
||||
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
|
||||
* Massimo Valentini <mvalentini@src.gnome.org>
|
||||
* Thomas Manni <thomas.manni@free.fr>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationlchlightness.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationLchLightness, gimp_operation_lch_lightness,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_lch_lightness_class_init (GimpOperationLchLightnessClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
operation_class->want_in_place = FALSE;
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:lch-lightness",
|
||||
"description", "GIMP LCH lightness mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_lch_lightness_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_lch_lightness_init (GimpOperationLchLightness *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_lch_lightness_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_lch_lightness);
|
||||
return TRUE;
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlchlightness.h
|
||||
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
|
||||
* Massimo Valentini <mvalentini@src.gnome.org>
|
||||
* Thomas Manni <thomas.manni@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_LCH_LIGHTNESS_H__
|
||||
#define __GIMP_OPERATION_LCH_LIGHTNESS_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_LCH_LIGHTNESS (gimp_operation_lch_lightness_get_type ())
|
||||
#define GIMP_OPERATION_LCH_LIGHTNESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LCH_LIGHTNESS, GimpOperationLchLightness))
|
||||
#define GIMP_OPERATION_LCH_LIGHTNESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LCH_LIGHTNESS, GimpOperationLchLightnessClass))
|
||||
#define GIMP_IS_OPERATION_LCH_LIGHTNESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LCH_LIGHTNESS))
|
||||
#define GIMP_IS_OPERATION_LCH_LIGHTNESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LCH_LIGHTNESS))
|
||||
#define GIMP_OPERATION_LCH_LIGHTNESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LCH_LIGHTNESS, GimpOperationLchLightnessClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationLchLightness GimpOperationLchLightness;
|
||||
typedef struct _GimpOperationLchLightnessClass GimpOperationLchLightnessClass;
|
||||
|
||||
struct _GimpOperationLchLightness
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationLchLightnessClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_lch_lightness_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_lch_lightness_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_LCH_LIGHTNESS_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlightenonlymode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationlightenonly.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationLightenOnly, gimp_operation_lighten_only,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_lighten_only_class_init (GimpOperationLightenOnlyClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:lighten-only",
|
||||
"description", "GIMP lighten only mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_lighten_only_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_lighten_only_init (GimpOperationLightenOnly *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_lighten_only_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_lighten_only);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationlightenonly.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_LIGHTEN_ONLY_H__
|
||||
#define __GIMP_OPERATION_LIGHTEN_ONLY_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_LIGHTEN_ONLY (gimp_operation_lighten_only_get_type ())
|
||||
#define GIMP_OPERATION_LIGHTEN_ONLY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LIGHTEN_ONLY, GimpOperationLightenOnly))
|
||||
#define GIMP_OPERATION_LIGHTEN_ONLY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LIGHTEN_ONLY, GimpOperationLightenOnlyClass))
|
||||
#define GIMP_IS_OPERATION_LIGHTEN_ONLY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LIGHTEN_ONLY))
|
||||
#define GIMP_IS_OPERATION_LIGHTEN_ONLY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LIGHTEN_ONLY))
|
||||
#define GIMP_OPERATION_LIGHTEN_ONLY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LIGHTEN_ONLY, GimpOperationLightenOnlyClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationLightenOnly GimpOperationLightenOnly;
|
||||
typedef struct _GimpOperationLightenOnlyClass GimpOperationLightenOnlyClass;
|
||||
|
||||
struct _GimpOperationLightenOnly
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationLightenOnlyClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_lighten_only_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_lighten_only_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_LIGHTEN_ONLY_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationmultiply.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationmultiply.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationMultiply, gimp_operation_multiply,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_multiply_class_init (GimpOperationMultiplyClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:multiply",
|
||||
"description", "GIMP multiply mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_multiply_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_multiply_init (GimpOperationMultiply *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_multiply_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_multiply);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationmultiply.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_MULTIPLY_H__
|
||||
#define __GIMP_OPERATION_MULTIPLY_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_MULTIPLY (gimp_operation_multiply_get_type ())
|
||||
#define GIMP_OPERATION_MULTIPLY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_MULTIPLY, GimpOperationMultiply))
|
||||
#define GIMP_OPERATION_MULTIPLY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_MULTIPLY, GimpOperationMultiplyClass))
|
||||
#define GIMP_IS_OPERATION_MULTIPLY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_MULTIPLY))
|
||||
#define GIMP_IS_OPERATION_MULTIPLY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_MULTIPLY))
|
||||
#define GIMP_OPERATION_MULTIPLY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_MULTIPLY, GimpOperationMultiplyClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationMultiply GimpOperationMultiply;
|
||||
typedef struct _GimpOperationMultiplyClass GimpOperationMultiplyClass;
|
||||
|
||||
struct _GimpOperationMultiply
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationMultiplyClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_multiply_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_multiply_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_MULTIPLY_H__ */
|
@ -1,71 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationoverlay.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationoverlay.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationOverlay, gimp_operation_overlay,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_overlay_class_init (GimpOperationOverlayClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:overlay",
|
||||
"description", "GIMP overlay mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_overlay_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_overlay_init (GimpOperationOverlay *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_overlay_process (GeglOperation *operation,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (operation, in, layer, mask, out, samples,
|
||||
blendfun_overlay);
|
||||
return TRUE;
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationoverlay.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_OVERLAY_H__
|
||||
#define __GIMP_OPERATION_OVERLAY_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_OVERLAY (gimp_operation_overlay_get_type ())
|
||||
#define GIMP_OPERATION_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_OVERLAY, GimpOperationOverlay))
|
||||
#define GIMP_OPERATION_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_OVERLAY, GimpOperationOverlayClass))
|
||||
#define GIMP_IS_OPERATION_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_OVERLAY))
|
||||
#define GIMP_IS_OPERATION_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_OVERLAY))
|
||||
#define GIMP_OPERATION_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_OVERLAY, GimpOperationOverlayClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationOverlay GimpOperationOverlay;
|
||||
typedef struct _GimpOperationOverlayClass GimpOperationOverlayClass;
|
||||
|
||||
struct _GimpOperationOverlay
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationOverlayClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_overlay_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_overlay_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_OVERLAY_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationscreen.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationscreen.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationScreen, gimp_operation_screen,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_screen_class_init (GimpOperationScreenClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:screen",
|
||||
"description", "GIMP screen mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_screen_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_screen_init (GimpOperationScreen *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_screen_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_screen);
|
||||
return TRUE;
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationscreen.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_SCREEN_H__
|
||||
#define __GIMP_OPERATION_SCREEN_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_SCREEN (gimp_operation_screen_get_type ())
|
||||
#define GIMP_OPERATION_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_SCREEN, GimpOperationScreen))
|
||||
#define GIMP_OPERATION_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_SCREEN, GimpOperationScreenClass))
|
||||
#define GIMP_IS_OPERATION_SCREEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_SCREEN))
|
||||
#define GIMP_IS_OPERATION_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_SCREEN))
|
||||
#define GIMP_OPERATION_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_SCREEN, GimpOperationScreenClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationScreen GimpOperationScreen;
|
||||
typedef struct _GimpOperationScreenClass GimpOperationScreenClass;
|
||||
|
||||
struct _GimpOperationScreen
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationScreenClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_screen_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_screen_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_SCREEN_H__ */
|
@ -1,90 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationsoftlightmode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationsoftlight.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationSoftlight, gimp_operation_softlight,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static const gchar* reference_xml = "<?xml version='1.0' encoding='UTF-8'?>"
|
||||
"<gegl>"
|
||||
"<node operation='gimp:softlight-mode'>"
|
||||
" <node operation='gegl:load'>"
|
||||
" <params>"
|
||||
" <param name='path'>B.png</param>"
|
||||
" </params>"
|
||||
" </node>"
|
||||
"</node>"
|
||||
"<node operation='gegl:load'>"
|
||||
" <params>"
|
||||
" <param name='path'>A.png</param>"
|
||||
" </params>"
|
||||
"</node>"
|
||||
"</gegl>";
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_softlight_class_init (GimpOperationSoftlightClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:softlight",
|
||||
"description", "GIMP softlight mode operation",
|
||||
"reference-image", "soft-light-mode.png",
|
||||
"reference-composition", reference_xml,
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_softlight_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_softlight_init (GimpOperationSoftlight *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_softlight_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_softlight);
|
||||
return TRUE;
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationsoftlight.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_SOFTLIGHT_H__
|
||||
#define __GIMP_OPERATION_SOFTLIGHT_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_SOFTLIGHT (gimp_operation_softlight_get_type ())
|
||||
#define GIMP_OPERATION_SOFTLIGHT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE, GimpOperationSoftlight))
|
||||
#define GIMP_OPERATION_SOFTLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE, GimpOperationSoftlightClass))
|
||||
#define GIMP_IS_OPERATION_SOFTLIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE))
|
||||
#define GIMP_IS_OPERATION_SOFTLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE))
|
||||
#define GIMP_OPERATION_SOFTLIGHT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_SOFTLIGHT_MODE, GimpOperationSoftlightClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationSoftlight GimpOperationSoftlight;
|
||||
typedef struct _GimpOperationSoftlightClass GimpOperationSoftlightClass;
|
||||
|
||||
struct _GimpOperationSoftlight
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationSoftlightClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_softlight_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_softlight_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_SOFTLIGHT_H__ */
|
@ -1,72 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationsubtractmode.c
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2012 Ville Sokk <ville.sokk@gmail.com>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gegl-plugin.h>
|
||||
|
||||
#include "../operations-types.h"
|
||||
|
||||
#include "gimpoperationsubtract.h"
|
||||
#include "gimpblendcomposite.h"
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationSubtract, gimp_operation_subtract,
|
||||
GIMP_TYPE_OPERATION_LAYER_MODE)
|
||||
|
||||
|
||||
static void
|
||||
gimp_operation_subtract_class_init (GimpOperationSubtractClass *klass)
|
||||
{
|
||||
GeglOperationClass *operation_class;
|
||||
GeglOperationPointComposer3Class *point_class;
|
||||
|
||||
operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
point_class = GEGL_OPERATION_POINT_COMPOSER3_CLASS (klass);
|
||||
|
||||
gegl_operation_class_set_keys (operation_class,
|
||||
"name", "gimp:subtract",
|
||||
"description", "GIMP subtract mode operation",
|
||||
NULL);
|
||||
|
||||
point_class->process = gimp_operation_subtract_process;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_operation_subtract_init (GimpOperationSubtract *self)
|
||||
{
|
||||
}
|
||||
|
||||
gboolean
|
||||
gimp_operation_subtract_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level)
|
||||
{
|
||||
gimp_composite_blend (op, in, layer, mask, out, samples,
|
||||
blendfun_subtract);
|
||||
return TRUE;
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpoperationsubtract.h
|
||||
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
|
||||
* 2017 Øyvind Kolås <pippin@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_OPERATION_SUBTRACT_H__
|
||||
#define __GIMP_OPERATION_SUBTRACT_H__
|
||||
|
||||
|
||||
#include "gimpoperationlayermode.h"
|
||||
|
||||
|
||||
#define GIMP_TYPE_OPERATION_SUBTRACT (gimp_operation_subtract_get_type ())
|
||||
#define GIMP_OPERATION_SUBTRACT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_SUBTRACT, GimpOperationSubtract))
|
||||
#define GIMP_OPERATION_SUBTRACT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_SUBTRACT, GimpOperationSubtractClass))
|
||||
#define GIMP_IS_OPERATION_SUBTRACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_SUBTRACT))
|
||||
#define GIMP_IS_OPERATION_SUBTRACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_SUBTRACT))
|
||||
#define GIMP_OPERATION_SUBTRACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_SUBTRACT, GimpOperationSubtractClass))
|
||||
|
||||
|
||||
typedef struct _GimpOperationSubtract GimpOperationSubtract;
|
||||
typedef struct _GimpOperationSubtractClass GimpOperationSubtractClass;
|
||||
|
||||
struct _GimpOperationSubtract
|
||||
{
|
||||
GimpOperationLayerMode parent_instance;
|
||||
};
|
||||
|
||||
struct _GimpOperationSubtractClass
|
||||
{
|
||||
GimpOperationLayerModeClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType gimp_operation_subtract_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gboolean gimp_operation_subtract_process (GeglOperation *op,
|
||||
void *in,
|
||||
void *layer,
|
||||
void *mask,
|
||||
void *out,
|
||||
glong samples,
|
||||
const GeglRectangle *roi,
|
||||
gint level);
|
||||
|
||||
|
||||
#endif /* __GIMP_OPERATION_SUBTRACT_H__ */
|
@ -123,15 +123,20 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
|
||||
GIMP_LAYER_MODE_MULTIPLY_LEGACY,
|
||||
GIMP_LAYER_MODE_BURN,
|
||||
GIMP_LAYER_MODE_BURN_LEGACY,
|
||||
GIMP_LAYER_MODE_LINEAR_BURN,
|
||||
GIMP_LAYER_MODE_OVERLAY,
|
||||
GIMP_LAYER_MODE_SOFTLIGHT,
|
||||
GIMP_LAYER_MODE_SOFTLIGHT_LEGACY,
|
||||
GIMP_LAYER_MODE_HARDLIGHT,
|
||||
GIMP_LAYER_MODE_HARDLIGHT_LEGACY,
|
||||
GIMP_LAYER_MODE_VIVID_LIGHT,
|
||||
GIMP_LAYER_MODE_PIN_LIGHT,
|
||||
GIMP_LAYER_MODE_LINEAR_LIGHT,
|
||||
GIMP_LAYER_MODE_DIFFERENCE,
|
||||
GIMP_LAYER_MODE_DIFFERENCE_LEGACY,
|
||||
GIMP_LAYER_MODE_SUBTRACT,
|
||||
GIMP_LAYER_MODE_SUBTRACT_LEGACY,
|
||||
GIMP_LAYER_MODE_EXCLUSION,
|
||||
GIMP_LAYER_MODE_GRAIN_EXTRACT,
|
||||
GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY,
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE,
|
||||
@ -158,10 +163,10 @@ gimp_paint_mode_menu_new (gboolean with_behind_mode,
|
||||
GIMP_LAYER_MODE_ADDITION_LEGACY, -1);
|
||||
|
||||
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
|
||||
GIMP_LAYER_MODE_BURN_LEGACY, -1);
|
||||
GIMP_LAYER_MODE_LINEAR_BURN, -1);
|
||||
|
||||
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
|
||||
GIMP_LAYER_MODE_HARDLIGHT_LEGACY, -1);
|
||||
GIMP_LAYER_MODE_LINEAR_LIGHT, -1);
|
||||
|
||||
gimp_int_store_insert_separator_after (GIMP_INT_STORE (store),
|
||||
GIMP_LAYER_MODE_DIVIDE_LEGACY, -1);
|
||||
|
@ -131,7 +131,17 @@ typedef enum
|
||||
GIMP_LAYER_MODE_GRAIN_EXTRACT,
|
||||
GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR,
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE,
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR,
|
||||
GIMP_LAYER_MODE_VIVID_LIGHT,
|
||||
GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR,
|
||||
GIMP_LAYER_MODE_PIN_LIGHT,
|
||||
GIMP_LAYER_MODE_PIN_LIGHT_LINEAR,
|
||||
GIMP_LAYER_MODE_LINEAR_LIGHT,
|
||||
GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR,
|
||||
GIMP_LAYER_MODE_EXCLUSION,
|
||||
GIMP_LAYER_MODE_EXCLUSION_LINEAR,
|
||||
GIMP_LAYER_MODE_LINEAR_BURN,
|
||||
GIMP_LAYER_MODE_LINEAR_BURN_LINEAR
|
||||
} GimpLayerMode;
|
||||
|
||||
|
||||
|
@ -752,7 +752,17 @@ package Gimp::CodeGen::enums;
|
||||
GIMP_LAYER_MODE_GRAIN_EXTRACT
|
||||
GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR) ],
|
||||
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR
|
||||
GIMP_LAYER_MODE_VIVID_LIGHT
|
||||
GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR
|
||||
GIMP_LAYER_MODE_PIN_LIGHT
|
||||
GIMP_LAYER_MODE_PIN_LIGHT_LINEAR
|
||||
GIMP_LAYER_MODE_LINEAR_LIGHT
|
||||
GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR
|
||||
GIMP_LAYER_MODE_EXCLUSION
|
||||
GIMP_LAYER_MODE_EXCLUSION_LINEAR
|
||||
GIMP_LAYER_MODE_LINEAR_BURN
|
||||
GIMP_LAYER_MODE_LINEAR_BURN_LINEAR) ],
|
||||
mapping => { GIMP_LAYER_MODE_NORMAL_NON_LINEAR => '0',
|
||||
GIMP_LAYER_MODE_DISSOLVE => '1',
|
||||
GIMP_LAYER_MODE_BEHIND => '2',
|
||||
@ -815,7 +825,17 @@ package Gimp::CodeGen::enums;
|
||||
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_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' }
|
||||
},
|
||||
GimpBrushApplicationMode =>
|
||||
{ contig => 1,
|
||||
|
Reference in New Issue
Block a user