app: move the LCH layer modes to layer-modes/

This commit is contained in:
Michael Natterer
2017-01-10 01:04:49 +01:00
parent 92047ea949
commit 60e1d8e35f
17 changed files with 496 additions and 493 deletions

View File

@ -264,19 +264,19 @@ gimp_gegl_mode_node_set_mode (GeglNode *node,
break;
case GIMP_LAYER_MODE_LCH_HUE:
operation = "gimp:lch-hue-mode";
operation = "gimp:lch-hue";
break;
case GIMP_LAYER_MODE_LCH_CHROMA:
operation = "gimp:lch-chroma-mode";
operation = "gimp:lch-chroma";
break;
case GIMP_LAYER_MODE_LCH_COLOR:
operation = "gimp:lch-color-mode";
operation = "gimp:lch-color";
break;
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
operation = "gimp:lch-lightness-mode";
operation = "gimp:lch-lightness";
break;
case GIMP_LAYER_MODE_ERASE:

View File

@ -131,14 +131,6 @@ libappoperations_a_SOURCES = \
gimpoperationgrainmergemode.h \
gimpoperationcolorerasemode.c \
gimpoperationcolorerasemode.h \
gimpoperationlchhuemode.c \
gimpoperationlchhuemode.h \
gimpoperationlchchromamode.c \
gimpoperationlchchromamode.h \
gimpoperationlchcolormode.c \
gimpoperationlchcolormode.h \
gimpoperationlchlightnessmode.c \
gimpoperationlchlightnessmode.h \
gimpoperationerasemode.c \
gimpoperationerasemode.h \
gimpoperationreplacemode.c \

View File

@ -93,10 +93,10 @@
#include "gimpoperationgrainextractmode.h"
#include "gimpoperationgrainmergemode.h"
#include "gimpoperationcolorerasemode.h"
#include "gimpoperationlchhuemode.h"
#include "gimpoperationlchchromamode.h"
#include "gimpoperationlchcolormode.h"
#include "gimpoperationlchlightnessmode.h"
#include "layer-modes/gimpoperationlchhue.h"
#include "layer-modes/gimpoperationlchchroma.h"
#include "layer-modes/gimpoperationlchcolor.h"
#include "layer-modes/gimpoperationlchlightness.h"
#include "gimpoperationerasemode.h"
#include "gimpoperationreplacemode.h"
#include "gimpoperationantierasemode.h"
@ -161,10 +161,10 @@ gimp_operations_init (void)
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_HUE_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_CHROMA_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_COLOR_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_LIGHTNESS_MODE);
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_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_REPLACE_MODE);
g_type_class_ref (GIMP_TYPE_OPERATION_ANTI_ERASE_MODE);

View File

@ -53,10 +53,10 @@
#include "gimpoperationgrainextractmode.h"
#include "gimpoperationgrainmergemode.h"
#include "gimpoperationcolorerasemode.h"
#include "gimpoperationlchhuemode.h"
#include "gimpoperationlchchromamode.h"
#include "gimpoperationlchcolormode.h"
#include "gimpoperationlchlightnessmode.h"
#include "layer-modes/gimpoperationlchhue.h"
#include "layer-modes/gimpoperationlchchroma.h"
#include "layer-modes/gimpoperationlchcolor.h"
#include "layer-modes/gimpoperationlchlightness.h"
#include "gimpoperationerasemode.h"
#include "gimpoperationreplacemode.h"
#include "gimpoperationantierasemode.h"
@ -184,26 +184,26 @@ get_layer_mode_function (GimpLayerMode paint_mode,
case GIMP_LAYER_MODE_LCH_HUE:
func = linear_mode ?
gimp_operation_lch_hue_mode_process_pixels_linear :
gimp_operation_lch_hue_mode_process_pixels;
gimp_operation_lch_hue_process_pixels_linear :
gimp_operation_lch_hue_process_pixels;
break;
case GIMP_LAYER_MODE_LCH_CHROMA:
func = linear_mode ?
gimp_operation_lch_chroma_mode_process_pixels_linear :
gimp_operation_lch_chroma_mode_process_pixels;
gimp_operation_lch_chroma_process_pixels_linear :
gimp_operation_lch_chroma_process_pixels;
break;
case GIMP_LAYER_MODE_LCH_COLOR:
func = linear_mode ?
gimp_operation_lch_color_mode_process_pixels_linear :
gimp_operation_lch_color_mode_process_pixels;
gimp_operation_lch_color_process_pixels_linear :
gimp_operation_lch_color_process_pixels;
break;
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
func = linear_mode ?
gimp_operation_lch_lightness_mode_process_pixels_linear :
gimp_operation_lch_lightness_mode_process_pixels;
gimp_operation_lch_lightness_process_pixels_linear :
gimp_operation_lch_lightness_process_pixels;
break;
case GIMP_LAYER_MODE_ERASE:

View File

@ -1,72 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationlchchromamode.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_MODE_H__
#define __GIMP_OPERATION_LCH_CHROMA_MODE_H__
#include "gimpoperationpointlayermode.h"
#define GIMP_TYPE_OPERATION_LCH_CHROMA_MODE (gimp_operation_lch_chroma_mode_get_type ())
#define GIMP_OPERATION_LCH_CHROMA_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LCH_CHROMA_MODE, GimpOperationLchChromaMode))
#define GIMP_OPERATION_LCH_CHROMA_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LCH_CHROMA_MODE, GimpOperationLchChromaModeClass))
#define GIMP_IS_OPERATION_LCH_CHROMA_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LCH_CHROMA_MODE))
#define GIMP_IS_OPERATION_LCH_CHROMA_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LCH_CHROMA_MODE))
#define GIMP_OPERATION_LCH_CHROMA_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LCH_CHROMA_MODE, GimpOperationLchChromaModeClass))
typedef struct _GimpOperationLchChromaMode GimpOperationLchChromaMode;
typedef struct _GimpOperationLchChromaModeClass GimpOperationLchChromaModeClass;
struct _GimpOperationLchChromaMode
{
GimpOperationPointLayerMode parent_instance;
};
struct _GimpOperationLchChromaModeClass
{
GimpOperationPointLayerModeClass parent_class;
};
GType gimp_operation_lch_chroma_mode_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_lch_chroma_mode_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
gboolean gimp_operation_lch_chroma_mode_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
#endif /* __GIMP_OPERATION_LCH_CHROMA_MODE_H__ */

View File

@ -1,72 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationlchcolormode.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_MODE_H__
#define __GIMP_OPERATION_LCH_COLOR_MODE_H__
#include "gimpoperationpointlayermode.h"
#define GIMP_TYPE_OPERATION_LCH_COLOR_MODE (gimp_operation_lch_color_mode_get_type ())
#define GIMP_OPERATION_LCH_COLOR_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LCH_COLOR_MODE, GimpOperationLchColorMode))
#define GIMP_OPERATION_LCH_COLOR_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LCH_COLOR_MODE, GimpOperationLchColorModeClass))
#define GIMP_IS_OPERATION_LCH_COLOR_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LCH_COLOR_MODE))
#define GIMP_IS_OPERATION_LCH_COLOR_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LCH_COLOR_MODE))
#define GIMP_OPERATION_LCH_COLOR_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LCH_COLOR_MODE, GimpOperationLchColorModeClass))
typedef struct _GimpOperationLchColorMode GimpOperationLchColorMode;
typedef struct _GimpOperationLchColorModeClass GimpOperationLchColorModeClass;
struct _GimpOperationLchColorMode
{
GimpOperationPointLayerMode parent_instance;
};
struct _GimpOperationLchColorModeClass
{
GimpOperationPointLayerModeClass parent_class;
};
GType gimp_operation_lch_color_mode_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_lch_color_mode_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
gboolean gimp_operation_lch_color_mode_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
#endif /* __GIMP_OPERATION_LCH_COLOR_MODE_H__ */

View File

@ -1,72 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationlchhuemode.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_MODE_H__
#define __GIMP_OPERATION_LCH_HUE_MODE_H__
#include "gimpoperationpointlayermode.h"
#define GIMP_TYPE_OPERATION_LCH_HUE_MODE (gimp_operation_lch_hue_mode_get_type ())
#define GIMP_OPERATION_LCH_HUE_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LCH_HUE_MODE, GimpOperationLchHueMode))
#define GIMP_OPERATION_LCH_HUE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LCH_HUE_MODE, GimpOperationLchHueModeClass))
#define GIMP_IS_OPERATION_LCH_HUE_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LCH_HUE_MODE))
#define GIMP_IS_OPERATION_LCH_HUE_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LCH_HUE_MODE))
#define GIMP_OPERATION_LCH_HUE_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LCH_HUE_MODE, GimpOperationLchHueModeClass))
typedef struct _GimpOperationLchHueMode GimpOperationLchHueMode;
typedef struct _GimpOperationLchHueModeClass GimpOperationLchHueModeClass;
struct _GimpOperationLchHueMode
{
GimpOperationPointLayerMode parent_instance;
};
struct _GimpOperationLchHueModeClass
{
GimpOperationPointLayerModeClass parent_class;
};
GType gimp_operation_lch_hue_mode_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_lch_hue_mode_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
gboolean gimp_operation_lch_hue_mode_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
#endif /* __GIMP_OPERATION_LCH_HUE_MODE_H__ */

View File

@ -1,72 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationlchlightnessmode.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_MODE_H__
#define __GIMP_OPERATION_LCH_LIGHTNESS_MODE_H__
#include "gimpoperationpointlayermode.h"
#define GIMP_TYPE_OPERATION_LCH_LIGHTNESS_MODE (gimp_operation_lch_lightness_mode_get_type ())
#define GIMP_OPERATION_LCH_LIGHTNESS_MODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_LCH_LIGHTNESS_MODE, GimpOperationLchLightnessMode))
#define GIMP_OPERATION_LCH_LIGHTNESS_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_LCH_LIGHTNESS_MODE, GimpOperationLchLightnessModeClass))
#define GIMP_IS_OPERATION_LCH_LIGHTNESS_MODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_LCH_LIGHTNESS_MODE))
#define GIMP_IS_OPERATION_LCH_LIGHTNESS_MODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_LCH_LIGHTNESS_MODE))
#define GIMP_OPERATION_LCH_LIGHTNESS_MODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_LCH_LIGHTNESS_MODE, GimpOperationLchLightnessModeClass))
typedef struct _GimpOperationLchLightnessMode GimpOperationLchLightnessMode;
typedef struct _GimpOperationLchLightnessModeClass GimpOperationLchLightnessModeClass;
struct _GimpOperationLchLightnessMode
{
GimpOperationPointLayerMode parent_instance;
};
struct _GimpOperationLchLightnessModeClass
{
GimpOperationPointLayerModeClass parent_class;
};
GType gimp_operation_lch_lightness_mode_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_lch_lightness_mode_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
gboolean gimp_operation_lch_lightness_mode_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
#endif /* __GIMP_OPERATION_LCH_LIGHTNESS_MODE_H__ */

View File

@ -29,7 +29,15 @@ libapplayermodes_generic_a_sources = \
gimpoperationscreen.c \
gimpoperationscreen.h \
gimpoperationdifference.c \
gimpoperationdifference.h
gimpoperationdifference.h \
gimpoperationlchhue.c \
gimpoperationlchhue.h \
gimpoperationlchchroma.c \
gimpoperationlchchroma.h \
gimpoperationlchcolor.c \
gimpoperationlchcolor.h \
gimpoperationlchlightness.c \
gimpoperationlchlightness.h
libapplayermodes_sse2_a_sources = \
gimpoperationnormal-sse2.c

View File

@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationlchchromamode.c
* gimpoperationlchchroma.c
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
* Massimo Valentini <mvalentini@src.gnome.org>
* Thomas Manni <thomas.manni@free.fr>
@ -28,29 +28,29 @@
#include "libgimpmath/gimpmath.h"
#include "operations-types.h"
#include "../operations-types.h"
#include "gimpoperationlchchromamode.h"
#include "gimpoperationlchchroma.h"
static gboolean gimp_operation_lch_chroma_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level);
static gboolean gimp_operation_lch_chroma_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level);
G_DEFINE_TYPE (GimpOperationLchChromaMode, gimp_operation_lch_chroma_mode,
G_DEFINE_TYPE (GimpOperationLchChroma, gimp_operation_lch_chroma,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
#define parent_class gimp_operation_lch_chroma_mode_parent_class
#define parent_class gimp_operation_lch_chroma_parent_class
static void
gimp_operation_lch_chroma_mode_class_init (GimpOperationLchChromaModeClass *klass)
gimp_operation_lch_chroma_class_init (GimpOperationLchChromaClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@ -61,34 +61,34 @@ gimp_operation_lch_chroma_mode_class_init (GimpOperationLchChromaModeClass *klas
operation_class->want_in_place = FALSE;
gegl_operation_class_set_keys (operation_class,
"name", "gimp:lch-chroma-mode",
"name", "gimp:lch-chroma",
"description", "GIMP LCH chroma mode operation",
NULL);
point_class->process = gimp_operation_lch_chroma_mode_process;
point_class->process = gimp_operation_lch_chroma_process;
}
static void
gimp_operation_lch_chroma_mode_init (GimpOperationLchChromaMode *self)
gimp_operation_lch_chroma_init (GimpOperationLchChroma *self)
{
}
static gboolean
gimp_operation_lch_chroma_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_chroma_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level)
{
GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
gfloat opacity = gimp_op->opacity;
gboolean linear = gimp_op->linear;
return (linear ? gimp_operation_lch_chroma_mode_process_pixels_linear :
gimp_operation_lch_chroma_mode_process_pixels)
return (linear ? gimp_operation_lch_chroma_process_pixels_linear :
gimp_operation_lch_chroma_process_pixels)
(in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level);
}
@ -172,14 +172,14 @@ chroma_post_process (const gfloat *in,
}
gboolean
gimp_operation_lch_chroma_mode_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_chroma_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
{
chroma_pre_process (babl_format ("RGBA float"), in, layer, out, samples);
chroma_post_process (in, layer, mask, out, opacity, samples);
@ -188,14 +188,14 @@ gimp_operation_lch_chroma_mode_process_pixels_linear (gfloat *in,
}
gboolean
gimp_operation_lch_chroma_mode_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_chroma_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
{
chroma_pre_process (babl_format ("R'G'B'A float"), in, layer, out, samples);
chroma_post_process (in, layer, mask, out, opacity, samples);

View File

@ -0,0 +1,73 @@
/* 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 "../gimpoperationpointlayermode.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
{
GimpOperationPointLayerMode parent_instance;
};
struct _GimpOperationLchChromaClass
{
GimpOperationPointLayerModeClass parent_class;
};
GType gimp_operation_lch_chroma_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_lch_chroma_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
gboolean gimp_operation_lch_chroma_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
#endif /* __GIMP_OPERATION_LCH_CHROMA_H__ */

View File

@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationlchcolormode.c
* gimpoperationlchcolor.c
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
* Massimo Valentini <mvalentini@src.gnome.org>
* Thomas Manni <thomas.manni@free.fr>
@ -28,29 +28,29 @@
#include "libgimpcolor/gimpcolor.h"
#include "operations-types.h"
#include "../operations-types.h"
#include "gimpoperationlchcolormode.h"
#include "gimpoperationlchcolor.h"
static gboolean gimp_operation_lch_color_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level);
static gboolean gimp_operation_lch_color_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level);
G_DEFINE_TYPE (GimpOperationLchColorMode, gimp_operation_lch_color_mode,
G_DEFINE_TYPE (GimpOperationLchColor, gimp_operation_lch_color,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
#define parent_class gimp_operation_lch_color_mode_parent_class
#define parent_class gimp_operation_lch_color_parent_class
static void
gimp_operation_lch_color_mode_class_init (GimpOperationLchColorModeClass *klass)
gimp_operation_lch_color_class_init (GimpOperationLchColorClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@ -61,34 +61,34 @@ gimp_operation_lch_color_mode_class_init (GimpOperationLchColorModeClass *klass)
operation_class->want_in_place = FALSE;
gegl_operation_class_set_keys (operation_class,
"name", "gimp:lch-color-mode",
"name", "gimp:lch-color",
"description", "GIMP LCH color mode operation",
NULL);
point_class->process = gimp_operation_lch_color_mode_process;
point_class->process = gimp_operation_lch_color_process;
}
static void
gimp_operation_lch_color_mode_init (GimpOperationLchColorMode *self)
gimp_operation_lch_color_init (GimpOperationLchColor *self)
{
}
static gboolean
gimp_operation_lch_color_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_color_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level)
{
GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
gfloat opacity = gimp_op->opacity;
gboolean linear = gimp_op->linear;
return (linear ? gimp_operation_lch_color_mode_process_pixels_linear :
gimp_operation_lch_color_mode_process_pixels)
return (linear ? gimp_operation_lch_color_process_pixels_linear :
gimp_operation_lch_color_process_pixels)
(in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level);
}
@ -161,14 +161,14 @@ color_post_process (const gfloat *in,
}
gboolean
gimp_operation_lch_color_mode_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_color_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
{
color_pre_process (babl_format ("RGBA float"), in, layer, out, samples);
color_post_process (in, layer, mask, out, opacity, samples);
@ -177,14 +177,14 @@ gimp_operation_lch_color_mode_process_pixels_linear (gfloat *in,
}
gboolean
gimp_operation_lch_color_mode_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_color_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
{
color_pre_process (babl_format ("R'G'B'A float"), in, layer, out, samples);
color_post_process (in, layer, mask, out, opacity, samples);

View File

@ -0,0 +1,73 @@
/* 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 "../gimpoperationpointlayermode.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
{
GimpOperationPointLayerMode parent_instance;
};
struct _GimpOperationLchColorClass
{
GimpOperationPointLayerModeClass parent_class;
};
GType gimp_operation_lch_color_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_lch_color_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
gboolean gimp_operation_lch_color_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
#endif /* __GIMP_OPERATION_LCH_COLOR_H__ */

View File

@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationlchhuemode.c
* gimpoperationlchhue.c
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
* Massimo Valentini <mvalentini@src.gnome.org>
* Thomas Manni <thomas.manni@free.fr>
@ -28,29 +28,29 @@
#include "libgimpmath/gimpmath.h"
#include "operations-types.h"
#include "../operations-types.h"
#include "gimpoperationlchhuemode.h"
#include "gimpoperationlchhue.h"
static gboolean gimp_operation_lch_hue_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level);
static gboolean gimp_operation_lch_hue_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level);
G_DEFINE_TYPE (GimpOperationLchHueMode, gimp_operation_lch_hue_mode,
G_DEFINE_TYPE (GimpOperationLchHue, gimp_operation_lch_hue,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
#define parent_class gimp_operation_lch_hue_mode_parent_class
#define parent_class gimp_operation_lch_hue_parent_class
static void
gimp_operation_lch_hue_mode_class_init (GimpOperationLchHueModeClass *klass)
gimp_operation_lch_hue_class_init (GimpOperationLchHueClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@ -61,34 +61,34 @@ gimp_operation_lch_hue_mode_class_init (GimpOperationLchHueModeClass *klass)
operation_class->want_in_place = FALSE;
gegl_operation_class_set_keys (operation_class,
"name", "gimp:lch-hue-mode",
"name", "gimp:lch-hue",
"description", "GIMP LCH hue mode operation",
NULL);
point_class->process = gimp_operation_lch_hue_mode_process;
point_class->process = gimp_operation_lch_hue_process;
}
static void
gimp_operation_lch_hue_mode_init (GimpOperationLchHueMode *self)
gimp_operation_lch_hue_init (GimpOperationLchHue *self)
{
}
static gboolean
gimp_operation_lch_hue_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_hue_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level)
{
GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
gfloat opacity = gimp_op->opacity;
gboolean linear = gimp_op->linear;
return (linear ? gimp_operation_lch_hue_mode_process_pixels_linear :
gimp_operation_lch_hue_mode_process_pixels)
return (linear ? gimp_operation_lch_hue_process_pixels_linear :
gimp_operation_lch_hue_process_pixels)
(in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level);
}
@ -172,14 +172,14 @@ hue_post_process (const gfloat *in,
}
gboolean
gimp_operation_lch_hue_mode_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_hue_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
{
hue_pre_process (babl_format ("RGBA float"), in, layer, out, samples);
hue_post_process (in, layer, mask, out, opacity, samples);
@ -188,14 +188,14 @@ gimp_operation_lch_hue_mode_process_pixels_linear (gfloat *in,
}
gboolean
gimp_operation_lch_hue_mode_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_hue_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
{
hue_pre_process (babl_format ("R'G'B'A float"), in, layer, out, samples);
hue_post_process (in, layer, mask, out, opacity, samples);

View File

@ -0,0 +1,72 @@
/* 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 "../gimpoperationpointlayermode.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
{
GimpOperationPointLayerMode parent_instance;
};
struct _GimpOperationLchHueClass
{
GimpOperationPointLayerModeClass parent_class;
};
GType gimp_operation_lch_hue_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_lch_hue_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
gboolean gimp_operation_lch_hue_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
#endif /* __GIMP_OPERATION_LCH_HUE_H__ */

View File

@ -1,7 +1,7 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationlchlightnessmode.c
* gimpoperationlchlightness.c
* Copyright (C) 2015 Elle Stone <ellestone@ninedegreesbelow.com>
* Massimo Valentini <mvalentini@src.gnome.org>
* Thomas Manni <thomas.manni@free.fr>
@ -28,28 +28,28 @@
#include "libgimpcolor/gimpcolor.h"
#include "operations-types.h"
#include "../operations-types.h"
#include "gimpoperationlchlightnessmode.h"
#include "gimpoperationlchlightness.h"
static gboolean gimp_operation_lch_lightness_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level);
static gboolean gimp_operation_lch_lightness_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level);
G_DEFINE_TYPE (GimpOperationLchLightnessMode, gimp_operation_lch_lightness_mode,
G_DEFINE_TYPE (GimpOperationLchLightness, gimp_operation_lch_lightness,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
#define parent_class gimp_operation_lch_lightness_mode_parent_class
#define parent_class gimp_operation_lch_lightness_parent_class
static void
gimp_operation_lch_lightness_mode_class_init (GimpOperationLchLightnessModeClass *klass)
gimp_operation_lch_lightness_class_init (GimpOperationLchLightnessClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointComposer3Class *point_class;
@ -60,34 +60,34 @@ gimp_operation_lch_lightness_mode_class_init (GimpOperationLchLightnessModeClass
operation_class->want_in_place = FALSE;
gegl_operation_class_set_keys (operation_class,
"name", "gimp:lch-lightness-mode",
"name", "gimp:lch-lightness",
"description", "GIMP LCH lightness mode operation",
NULL);
point_class->process = gimp_operation_lch_lightness_mode_process;
point_class->process = gimp_operation_lch_lightness_process;
}
static void
gimp_operation_lch_lightness_mode_init (GimpOperationLchLightnessMode *self)
gimp_operation_lch_lightness_init (GimpOperationLchLightness *self)
{
}
static gboolean
gimp_operation_lch_lightness_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_lightness_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *aux2_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi,
gint level)
{
GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
gfloat opacity = gimp_op->opacity;
gboolean linear = gimp_op->linear;
return (linear ? gimp_operation_lch_lightness_mode_process_pixels_linear :
gimp_operation_lch_lightness_mode_process_pixels)
return (linear ? gimp_operation_lch_lightness_process_pixels_linear :
gimp_operation_lch_lightness_process_pixels)
(in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level);
}
@ -155,14 +155,14 @@ lightness_post_process (const gfloat *in,
}
gboolean
gimp_operation_lch_lightness_mode_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_lightness_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
{
lightness_pre_process (babl_format ("RGBA float"), in, layer, out, samples);
lightness_post_process (in, layer, mask, out, opacity, samples);
@ -171,14 +171,14 @@ gimp_operation_lch_lightness_mode_process_pixels_linear (gfloat *in
}
gboolean
gimp_operation_lch_lightness_mode_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
gimp_operation_lch_lightness_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level)
{
lightness_pre_process (babl_format ("R'G'B'A float"), in, layer, out, samples);
lightness_post_process (in, layer, mask, out, opacity, samples);

View File

@ -0,0 +1,73 @@
/* 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 "../gimpoperationpointlayermode.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
{
GimpOperationPointLayerMode parent_instance;
};
struct _GimpOperationLchLightnessClass
{
GimpOperationPointLayerModeClass parent_class;
};
GType gimp_operation_lch_lightness_get_type (void) G_GNUC_CONST;
gboolean gimp_operation_lch_lightness_process_pixels_linear (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
gboolean gimp_operation_lch_lightness_process_pixels (gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
gfloat opacity,
glong samples,
const GeglRectangle *roi,
gint level);
#endif /* __GIMP_OPERATION_LCH_LIGHTNESS_H__ */