app/gegl/Makefile.am app/gegl/gegl-types.h new parent class for all image
2008-01-25 Michael Natterer <mitch@gimp.org> * app/gegl/Makefile.am * app/gegl/gegl-types.h * app/gegl/gimpoperationpointfilter.[ch]: new parent class for all image map operations. Features a "config" member and "public" get_property() and set_property() functions to be used by subclasses. * app/gegl/gimpoperationcolorbalance.[ch] * app/gegl/gimpoperationcolorize.[ch] * app/gegl/gimpoperationcurves.[ch] * app/gegl/gimpoperationhuesaturation.[ch] * app/gegl/gimpoperationlevels.[ch] * app/gegl/gimpoperationposterize.[ch] * app/gegl/gimpoperationthreshold.[ch]: derive from GimpOperationPointFilter, remove "config" members, remove finalize(), get_property() and set_property() implementations and use the ones provided by the parent class. svn path=/trunk/; revision=24713
This commit is contained in:

committed by
Michael Natterer

parent
e79955d9ad
commit
a85213cd5f
20
ChangeLog
20
ChangeLog
@ -1,3 +1,23 @@
|
|||||||
|
2008-01-25 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/gegl/Makefile.am
|
||||||
|
* app/gegl/gegl-types.h
|
||||||
|
* app/gegl/gimpoperationpointfilter.[ch]: new parent class for all
|
||||||
|
image map operations. Features a "config" member and "public"
|
||||||
|
get_property() and set_property() functions to be used by
|
||||||
|
subclasses.
|
||||||
|
|
||||||
|
* app/gegl/gimpoperationcolorbalance.[ch]
|
||||||
|
* app/gegl/gimpoperationcolorize.[ch]
|
||||||
|
* app/gegl/gimpoperationcurves.[ch]
|
||||||
|
* app/gegl/gimpoperationhuesaturation.[ch]
|
||||||
|
* app/gegl/gimpoperationlevels.[ch]
|
||||||
|
* app/gegl/gimpoperationposterize.[ch]
|
||||||
|
* app/gegl/gimpoperationthreshold.[ch]: derive from
|
||||||
|
GimpOperationPointFilter, remove "config" members, remove
|
||||||
|
finalize(), get_property() and set_property() implementations and
|
||||||
|
use the ones provided by the parent class.
|
||||||
|
|
||||||
2008-01-25 Michael Natterer <mitch@gimp.org>
|
2008-01-25 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/gegl/Makefile.am
|
* app/gegl/Makefile.am
|
||||||
|
@ -35,6 +35,8 @@ libappgegl_a_SOURCES = \
|
|||||||
gimpoperationhuesaturation.h \
|
gimpoperationhuesaturation.h \
|
||||||
gimpoperationlevels.c \
|
gimpoperationlevels.c \
|
||||||
gimpoperationlevels.h \
|
gimpoperationlevels.h \
|
||||||
|
gimpoperationpointfilter.c \
|
||||||
|
gimpoperationpointfilter.h \
|
||||||
gimpoperationposterize.c \
|
gimpoperationposterize.c \
|
||||||
gimpoperationposterize.h \
|
gimpoperationposterize.h \
|
||||||
gimpoperationthreshold.c \
|
gimpoperationthreshold.c \
|
||||||
|
@ -34,6 +34,7 @@ typedef struct _GimpOperationCurves GimpOperationCurves;
|
|||||||
typedef struct _GimpOperationDesaturate GimpOperationDesaturate;
|
typedef struct _GimpOperationDesaturate GimpOperationDesaturate;
|
||||||
typedef struct _GimpOperationHueSaturation GimpOperationHueSaturation;
|
typedef struct _GimpOperationHueSaturation GimpOperationHueSaturation;
|
||||||
typedef struct _GimpOperationLevels GimpOperationLevels;
|
typedef struct _GimpOperationLevels GimpOperationLevels;
|
||||||
|
typedef struct _GimpOperationPointFilter GimpOperationPointFilter;
|
||||||
typedef struct _GimpOperationPosterize GimpOperationPosterize;
|
typedef struct _GimpOperationPosterize GimpOperationPosterize;
|
||||||
typedef struct _GimpOperationThreshold GimpOperationThreshold;
|
typedef struct _GimpOperationThreshold GimpOperationThreshold;
|
||||||
typedef struct _GimpOperationTileSink GimpOperationTileSink;
|
typedef struct _GimpOperationTileSink GimpOperationTileSink;
|
||||||
|
@ -32,23 +32,6 @@
|
|||||||
#include "gimpoperationcolorbalance.h"
|
#include "gimpoperationcolorbalance.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_CONFIG
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_operation_color_balance_finalize (GObject *object);
|
|
||||||
static void gimp_operation_color_balance_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gimp_operation_color_balance_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
static gboolean gimp_operation_color_balance_process (GeglOperation *operation,
|
static gboolean gimp_operation_color_balance_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
@ -56,7 +39,7 @@ static gboolean gimp_operation_color_balance_process (GeglOperation *operat
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpOperationColorBalance, gimp_operation_color_balance,
|
G_DEFINE_TYPE (GimpOperationColorBalance, gimp_operation_color_balance,
|
||||||
GEGL_TYPE_OPERATION_POINT_FILTER)
|
GIMP_TYPE_OPERATION_POINT_FILTER)
|
||||||
|
|
||||||
#define parent_class gimp_operation_color_balance_parent_class
|
#define parent_class gimp_operation_color_balance_parent_class
|
||||||
|
|
||||||
@ -68,15 +51,15 @@ gimp_operation_color_balance_class_init (GimpOperationColorBalanceClass * klass)
|
|||||||
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
||||||
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
||||||
|
|
||||||
object_class->finalize = gimp_operation_color_balance_finalize;
|
object_class->set_property = gimp_operation_point_filter_set_property;
|
||||||
object_class->set_property = gimp_operation_color_balance_set_property;
|
object_class->get_property = gimp_operation_point_filter_get_property;
|
||||||
object_class->get_property = gimp_operation_color_balance_get_property;
|
|
||||||
|
|
||||||
point_class->process = gimp_operation_color_balance_process;
|
point_class->process = gimp_operation_color_balance_process;
|
||||||
|
|
||||||
gegl_operation_class_set_name (operation_class, "gimp-color-balance");
|
gegl_operation_class_set_name (operation_class, "gimp-color-balance");
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_CONFIG,
|
g_object_class_install_property (object_class,
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
|
||||||
g_param_spec_object ("config",
|
g_param_spec_object ("config",
|
||||||
"Config",
|
"Config",
|
||||||
"The config object",
|
"The config object",
|
||||||
@ -90,62 +73,6 @@ gimp_operation_color_balance_init (GimpOperationColorBalance *self)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_color_balance_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GimpOperationColorBalance *self = GIMP_OPERATION_COLOR_BALANCE (object);
|
|
||||||
|
|
||||||
if (self->config)
|
|
||||||
{
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_color_balance_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationColorBalance *self = GIMP_OPERATION_COLOR_BALANCE (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
g_value_set_object (value, self->config);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_color_balance_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationColorBalance *self = GIMP_OPERATION_COLOR_BALANCE (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
if (self->config)
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = g_value_dup_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline gfloat
|
static inline gfloat
|
||||||
gimp_operation_color_balance_map (gfloat value,
|
gimp_operation_color_balance_map (gfloat value,
|
||||||
gdouble shadows,
|
gdouble shadows,
|
||||||
@ -188,8 +115,8 @@ gimp_operation_color_balance_process (GeglOperation *operation,
|
|||||||
void *out_buf,
|
void *out_buf,
|
||||||
glong samples)
|
glong samples)
|
||||||
{
|
{
|
||||||
GimpOperationColorBalance *self = GIMP_OPERATION_COLOR_BALANCE (operation);
|
GimpOperationPointFilter *point = GIMP_OPERATION_POINT_FILTER (operation);
|
||||||
GimpColorBalanceConfig *config = self->config;
|
GimpColorBalanceConfig *config = GIMP_COLOR_BALANCE_CONFIG (point->config);
|
||||||
gfloat *src = in_buf;
|
gfloat *src = in_buf;
|
||||||
gfloat *dest = out_buf;
|
gfloat *dest = out_buf;
|
||||||
glong sample;
|
glong sample;
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#define __GIMP_OPERATION_COLOR_BALANCE_H__
|
#define __GIMP_OPERATION_COLOR_BALANCE_H__
|
||||||
|
|
||||||
|
|
||||||
#include <gegl-plugin.h>
|
#include "gimpoperationpointfilter.h"
|
||||||
#include <operation/gegl-operation-point-filter.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OPERATION_COLOR_BALANCE (gimp_operation_color_balance_get_type ())
|
#define GIMP_TYPE_OPERATION_COLOR_BALANCE (gimp_operation_color_balance_get_type ())
|
||||||
@ -39,14 +38,12 @@ typedef struct _GimpOperationColorBalanceClass GimpOperationColorBalanceClass;
|
|||||||
|
|
||||||
struct _GimpOperationColorBalance
|
struct _GimpOperationColorBalance
|
||||||
{
|
{
|
||||||
GeglOperationPointFilter parent_instance;
|
GimpOperationPointFilter parent_instance;
|
||||||
|
|
||||||
GimpColorBalanceConfig *config;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpOperationColorBalanceClass
|
struct _GimpOperationColorBalanceClass
|
||||||
{
|
{
|
||||||
GeglOperationPointFilterClass parent_class;
|
GimpOperationPointFilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,23 +31,6 @@
|
|||||||
#include "gimpoperationcolorize.h"
|
#include "gimpoperationcolorize.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_CONFIG
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_operation_colorize_finalize (GObject *object);
|
|
||||||
static void gimp_operation_colorize_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gimp_operation_colorize_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
static gboolean gimp_operation_colorize_process (GeglOperation *operation,
|
static gboolean gimp_operation_colorize_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
@ -55,7 +38,7 @@ static gboolean gimp_operation_colorize_process (GeglOperation *operation,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpOperationColorize, gimp_operation_colorize,
|
G_DEFINE_TYPE (GimpOperationColorize, gimp_operation_colorize,
|
||||||
GEGL_TYPE_OPERATION_POINT_FILTER)
|
GIMP_TYPE_OPERATION_POINT_FILTER)
|
||||||
|
|
||||||
#define parent_class gimp_operation_colorize_parent_class
|
#define parent_class gimp_operation_colorize_parent_class
|
||||||
|
|
||||||
@ -67,15 +50,15 @@ gimp_operation_colorize_class_init (GimpOperationColorizeClass * klass)
|
|||||||
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
||||||
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
||||||
|
|
||||||
object_class->finalize = gimp_operation_colorize_finalize;
|
object_class->set_property = gimp_operation_point_filter_set_property;
|
||||||
object_class->set_property = gimp_operation_colorize_set_property;
|
object_class->get_property = gimp_operation_point_filter_get_property;
|
||||||
object_class->get_property = gimp_operation_colorize_get_property;
|
|
||||||
|
|
||||||
point_class->process = gimp_operation_colorize_process;
|
point_class->process = gimp_operation_colorize_process;
|
||||||
|
|
||||||
gegl_operation_class_set_name (operation_class, "gimp-colorize");
|
gegl_operation_class_set_name (operation_class, "gimp-colorize");
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_CONFIG,
|
g_object_class_install_property (object_class,
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
|
||||||
g_param_spec_object ("config",
|
g_param_spec_object ("config",
|
||||||
"Config",
|
"Config",
|
||||||
"The config object",
|
"The config object",
|
||||||
@ -89,75 +72,22 @@ gimp_operation_colorize_init (GimpOperationColorize *self)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_colorize_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GimpOperationColorize *self = GIMP_OPERATION_COLORIZE (object);
|
|
||||||
|
|
||||||
if (self->config)
|
|
||||||
{
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_colorize_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationColorize *self = GIMP_OPERATION_COLORIZE (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
g_value_set_object (value, self->config);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_colorize_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationColorize *self = GIMP_OPERATION_COLORIZE (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
if (self->config)
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = g_value_dup_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gimp_operation_colorize_process (GeglOperation *operation,
|
gimp_operation_colorize_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
glong samples)
|
glong samples)
|
||||||
{
|
{
|
||||||
GimpOperationColorize *self = GIMP_OPERATION_COLORIZE (operation);
|
GimpOperationPointFilter *point = GIMP_OPERATION_POINT_FILTER (operation);
|
||||||
GimpColorizeConfig *config = self->config;
|
GimpColorizeConfig *config = GIMP_COLORIZE_CONFIG (point->config);
|
||||||
gfloat *src = in_buf;
|
gfloat *src = in_buf;
|
||||||
gfloat *dest = out_buf;
|
gfloat *dest = out_buf;
|
||||||
GimpHSL hsl;
|
GimpHSL hsl;
|
||||||
glong sample;
|
glong sample;
|
||||||
|
|
||||||
|
if (! config)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
hsl.h = config->hue;
|
hsl.h = config->hue;
|
||||||
hsl.s = config->saturation;
|
hsl.s = config->saturation;
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#ifndef __GIMP_OPERATION_COLORIZE_H__
|
#ifndef __GIMP_OPERATION_COLORIZE_H__
|
||||||
#define __GIMP_OPERATION_COLORIZE_H__
|
#define __GIMP_OPERATION_COLORIZE_H__
|
||||||
|
|
||||||
#include <gegl-plugin.h>
|
|
||||||
#include <operation/gegl-operation-point-filter.h>
|
#include "gimpoperationpointfilter.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OPERATION_COLORIZE (gimp_operation_colorize_get_type ())
|
#define GIMP_TYPE_OPERATION_COLORIZE (gimp_operation_colorize_get_type ())
|
||||||
@ -38,14 +38,12 @@ typedef struct _GimpOperationColorizeClass GimpOperationColorizeClass;
|
|||||||
|
|
||||||
struct _GimpOperationColorize
|
struct _GimpOperationColorize
|
||||||
{
|
{
|
||||||
GeglOperationPointFilter parent_instance;
|
GimpOperationPointFilter parent_instance;
|
||||||
|
|
||||||
GimpColorizeConfig *config;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpOperationColorizeClass
|
struct _GimpOperationColorizeClass
|
||||||
{
|
{
|
||||||
GeglOperationPointFilterClass parent_class;
|
GimpOperationPointFilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,23 +32,6 @@
|
|||||||
#include "gimpoperationcurves.h"
|
#include "gimpoperationcurves.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_CONFIG
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_operation_curves_finalize (GObject *object);
|
|
||||||
static void gimp_operation_curves_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gimp_operation_curves_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
static gboolean gimp_operation_curves_process (GeglOperation *operation,
|
static gboolean gimp_operation_curves_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
@ -56,7 +39,7 @@ static gboolean gimp_operation_curves_process (GeglOperation *operation,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpOperationCurves, gimp_operation_curves,
|
G_DEFINE_TYPE (GimpOperationCurves, gimp_operation_curves,
|
||||||
GEGL_TYPE_OPERATION_POINT_FILTER)
|
GIMP_TYPE_OPERATION_POINT_FILTER)
|
||||||
|
|
||||||
#define parent_class gimp_operation_curves_parent_class
|
#define parent_class gimp_operation_curves_parent_class
|
||||||
|
|
||||||
@ -68,15 +51,15 @@ gimp_operation_curves_class_init (GimpOperationCurvesClass * klass)
|
|||||||
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
||||||
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
||||||
|
|
||||||
object_class->finalize = gimp_operation_curves_finalize;
|
object_class->set_property = gimp_operation_point_filter_set_property;
|
||||||
object_class->set_property = gimp_operation_curves_set_property;
|
object_class->get_property = gimp_operation_point_filter_get_property;
|
||||||
object_class->get_property = gimp_operation_curves_get_property;
|
|
||||||
|
|
||||||
point_class->process = gimp_operation_curves_process;
|
point_class->process = gimp_operation_curves_process;
|
||||||
|
|
||||||
gegl_operation_class_set_name (operation_class, "gimp-curves");
|
gegl_operation_class_set_name (operation_class, "gimp-curves");
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_CONFIG,
|
g_object_class_install_property (object_class,
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
|
||||||
g_param_spec_object ("config",
|
g_param_spec_object ("config",
|
||||||
"Config",
|
"Config",
|
||||||
"The config object",
|
"The config object",
|
||||||
@ -90,62 +73,6 @@ gimp_operation_curves_init (GimpOperationCurves *self)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_curves_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GimpOperationCurves *self = GIMP_OPERATION_CURVES (object);
|
|
||||||
|
|
||||||
if (self->config)
|
|
||||||
{
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_curves_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationCurves *self = GIMP_OPERATION_CURVES (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
g_value_set_object (value, self->config);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_curves_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationCurves *self = GIMP_OPERATION_CURVES (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
if (self->config)
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = g_value_dup_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline gdouble
|
static inline gdouble
|
||||||
gimp_operation_curves_map (gdouble value,
|
gimp_operation_curves_map (gdouble value,
|
||||||
GimpCurve *curve)
|
GimpCurve *curve)
|
||||||
@ -176,8 +103,8 @@ gimp_operation_curves_process (GeglOperation *operation,
|
|||||||
void *out_buf,
|
void *out_buf,
|
||||||
glong samples)
|
glong samples)
|
||||||
{
|
{
|
||||||
GimpOperationCurves *self = GIMP_OPERATION_CURVES (operation);
|
GimpOperationPointFilter *point = GIMP_OPERATION_POINT_FILTER (operation);
|
||||||
GimpCurvesConfig *config = self->config;
|
GimpCurvesConfig *config = GIMP_CURVES_CONFIG (point->config);
|
||||||
gfloat *src = in_buf;
|
gfloat *src = in_buf;
|
||||||
gfloat *dest = out_buf;
|
gfloat *dest = out_buf;
|
||||||
glong sample;
|
glong sample;
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#define __GIMP_OPERATION_CURVES_H__
|
#define __GIMP_OPERATION_CURVES_H__
|
||||||
|
|
||||||
|
|
||||||
#include <gegl-plugin.h>
|
#include "gimpoperationpointfilter.h"
|
||||||
#include <operation/gegl-operation-point-filter.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OPERATION_CURVES (gimp_operation_curves_get_type ())
|
#define GIMP_TYPE_OPERATION_CURVES (gimp_operation_curves_get_type ())
|
||||||
@ -39,14 +38,12 @@ typedef struct _GimpOperationCurvesClass GimpOperationCurvesClass;
|
|||||||
|
|
||||||
struct _GimpOperationCurves
|
struct _GimpOperationCurves
|
||||||
{
|
{
|
||||||
GeglOperationPointFilter parent_instance;
|
GimpOperationPointFilter parent_instance;
|
||||||
|
|
||||||
GimpCurvesConfig *config;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpOperationCurvesClass
|
struct _GimpOperationCurvesClass
|
||||||
{
|
{
|
||||||
GeglOperationPointFilterClass parent_class;
|
GimpOperationPointFilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,23 +32,6 @@
|
|||||||
#include "gimpoperationhuesaturation.h"
|
#include "gimpoperationhuesaturation.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_CONFIG
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_operation_hue_saturation_finalize (GObject *object);
|
|
||||||
static void gimp_operation_hue_saturation_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gimp_operation_hue_saturation_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
static gboolean gimp_operation_hue_saturation_process (GeglOperation *operation,
|
static gboolean gimp_operation_hue_saturation_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
@ -56,7 +39,7 @@ static gboolean gimp_operation_hue_saturation_process (GeglOperation *opera
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpOperationHueSaturation, gimp_operation_hue_saturation,
|
G_DEFINE_TYPE (GimpOperationHueSaturation, gimp_operation_hue_saturation,
|
||||||
GEGL_TYPE_OPERATION_POINT_FILTER)
|
GIMP_TYPE_OPERATION_POINT_FILTER)
|
||||||
|
|
||||||
#define parent_class gimp_operation_hue_saturation_parent_class
|
#define parent_class gimp_operation_hue_saturation_parent_class
|
||||||
|
|
||||||
@ -68,15 +51,15 @@ gimp_operation_hue_saturation_class_init (GimpOperationHueSaturationClass * klas
|
|||||||
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
||||||
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
||||||
|
|
||||||
object_class->finalize = gimp_operation_hue_saturation_finalize;
|
object_class->set_property = gimp_operation_point_filter_set_property;
|
||||||
object_class->set_property = gimp_operation_hue_saturation_set_property;
|
object_class->get_property = gimp_operation_point_filter_get_property;
|
||||||
object_class->get_property = gimp_operation_hue_saturation_get_property;
|
|
||||||
|
|
||||||
point_class->process = gimp_operation_hue_saturation_process;
|
point_class->process = gimp_operation_hue_saturation_process;
|
||||||
|
|
||||||
gegl_operation_class_set_name (operation_class, "gimp-hue-saturation");
|
gegl_operation_class_set_name (operation_class, "gimp-hue-saturation");
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_CONFIG,
|
g_object_class_install_property (object_class,
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
|
||||||
g_param_spec_object ("config",
|
g_param_spec_object ("config",
|
||||||
"Config",
|
"Config",
|
||||||
"The config object",
|
"The config object",
|
||||||
@ -90,62 +73,6 @@ gimp_operation_hue_saturation_init (GimpOperationHueSaturation *self)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_hue_saturation_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GimpOperationHueSaturation *self = GIMP_OPERATION_HUE_SATURATION (object);
|
|
||||||
|
|
||||||
if (self->config)
|
|
||||||
{
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_hue_saturation_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationHueSaturation *self = GIMP_OPERATION_HUE_SATURATION (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
g_value_set_object (value, self->config);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_hue_saturation_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationHueSaturation *self = GIMP_OPERATION_HUE_SATURATION (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
if (self->config)
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = g_value_dup_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline gdouble
|
static inline gdouble
|
||||||
map_hue (GimpHueSaturationConfig *config,
|
map_hue (GimpHueSaturationConfig *config,
|
||||||
GimpHueRange range,
|
GimpHueRange range,
|
||||||
@ -200,13 +127,16 @@ gimp_operation_hue_saturation_process (GeglOperation *operation,
|
|||||||
void *out_buf,
|
void *out_buf,
|
||||||
glong samples)
|
glong samples)
|
||||||
{
|
{
|
||||||
GimpOperationHueSaturation *self = GIMP_OPERATION_HUE_SATURATION (operation);
|
GimpOperationPointFilter *point = GIMP_OPERATION_POINT_FILTER (operation);
|
||||||
GimpHueSaturationConfig *config = self->config;
|
GimpHueSaturationConfig *config = GIMP_HUE_SATURATION_CONFIG (point->config);
|
||||||
gfloat *src = in_buf;
|
gfloat *src = in_buf;
|
||||||
gfloat *dest = out_buf;
|
gfloat *dest = out_buf;
|
||||||
gfloat overlap = config->overlap / 2.0;
|
gfloat overlap = config->overlap / 2.0;
|
||||||
glong sample;
|
glong sample;
|
||||||
|
|
||||||
|
if (! config)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
for (sample = 0; sample < samples; sample++)
|
for (sample = 0; sample < samples; sample++)
|
||||||
{
|
{
|
||||||
GimpRGB rgb;
|
GimpRGB rgb;
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
#ifndef __GIMP_OPERATION_HUE_SATURATION_H__
|
#ifndef __GIMP_OPERATION_HUE_SATURATION_H__
|
||||||
#define __GIMP_OPERATION_HUE_SATURATION_H__
|
#define __GIMP_OPERATION_HUE_SATURATION_H__
|
||||||
|
|
||||||
#include <gegl-plugin.h>
|
|
||||||
#include <operation/gegl-operation-point-filter.h>
|
#include "gimpoperationpointfilter.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OPERATION_HUE_SATURATION (gimp_operation_hue_saturation_get_type ())
|
#define GIMP_TYPE_OPERATION_HUE_SATURATION (gimp_operation_hue_saturation_get_type ())
|
||||||
@ -38,14 +38,12 @@ typedef struct _GimpOperationHueSaturationClass GimpOperationHueSaturationClass;
|
|||||||
|
|
||||||
struct _GimpOperationHueSaturation
|
struct _GimpOperationHueSaturation
|
||||||
{
|
{
|
||||||
GeglOperationPointFilter parent_instance;
|
GimpOperationPointFilter parent_instance;
|
||||||
|
|
||||||
GimpHueSaturationConfig *config;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpOperationHueSaturationClass
|
struct _GimpOperationHueSaturationClass
|
||||||
{
|
{
|
||||||
GeglOperationPointFilterClass parent_class;
|
GimpOperationPointFilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,23 +32,6 @@
|
|||||||
#include "gimpoperationlevels.h"
|
#include "gimpoperationlevels.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_CONFIG
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_operation_levels_finalize (GObject *object);
|
|
||||||
static void gimp_operation_levels_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gimp_operation_levels_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
static gboolean gimp_operation_levels_process (GeglOperation *operation,
|
static gboolean gimp_operation_levels_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
@ -56,7 +39,7 @@ static gboolean gimp_operation_levels_process (GeglOperation *operation,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpOperationLevels, gimp_operation_levels,
|
G_DEFINE_TYPE (GimpOperationLevels, gimp_operation_levels,
|
||||||
GEGL_TYPE_OPERATION_POINT_FILTER)
|
GIMP_TYPE_OPERATION_POINT_FILTER)
|
||||||
|
|
||||||
#define parent_class gimp_operation_levels_parent_class
|
#define parent_class gimp_operation_levels_parent_class
|
||||||
|
|
||||||
@ -68,15 +51,15 @@ gimp_operation_levels_class_init (GimpOperationLevelsClass * klass)
|
|||||||
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
||||||
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
||||||
|
|
||||||
object_class->finalize = gimp_operation_levels_finalize;
|
object_class->set_property = gimp_operation_point_filter_set_property;
|
||||||
object_class->set_property = gimp_operation_levels_set_property;
|
object_class->get_property = gimp_operation_point_filter_get_property;
|
||||||
object_class->get_property = gimp_operation_levels_get_property;
|
|
||||||
|
|
||||||
point_class->process = gimp_operation_levels_process;
|
point_class->process = gimp_operation_levels_process;
|
||||||
|
|
||||||
gegl_operation_class_set_name (operation_class, "gimp-levels");
|
gegl_operation_class_set_name (operation_class, "gimp-levels");
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_CONFIG,
|
g_object_class_install_property (object_class,
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
|
||||||
g_param_spec_object ("config",
|
g_param_spec_object ("config",
|
||||||
"Config",
|
"Config",
|
||||||
"The config object",
|
"The config object",
|
||||||
@ -90,62 +73,6 @@ gimp_operation_levels_init (GimpOperationLevels *self)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_levels_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GimpOperationLevels *self = GIMP_OPERATION_LEVELS (object);
|
|
||||||
|
|
||||||
if (self->config)
|
|
||||||
{
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_levels_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationLevels *self = GIMP_OPERATION_LEVELS (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
g_value_set_object (value, self->config);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_levels_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationLevels *self = GIMP_OPERATION_LEVELS (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
if (self->config)
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = g_value_dup_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline gdouble
|
static inline gdouble
|
||||||
gimp_operation_levels_map (gdouble value,
|
gimp_operation_levels_map (gdouble value,
|
||||||
gdouble gamma,
|
gdouble gamma,
|
||||||
@ -183,8 +110,8 @@ gimp_operation_levels_process (GeglOperation *operation,
|
|||||||
void *out_buf,
|
void *out_buf,
|
||||||
glong samples)
|
glong samples)
|
||||||
{
|
{
|
||||||
GimpOperationLevels *self = GIMP_OPERATION_LEVELS (operation);
|
GimpOperationPointFilter *point = GIMP_OPERATION_POINT_FILTER (operation);
|
||||||
GimpLevelsConfig *config = self->config;
|
GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (point->config);
|
||||||
gfloat *src = in_buf;
|
gfloat *src = in_buf;
|
||||||
gfloat *dest = out_buf;
|
gfloat *dest = out_buf;
|
||||||
glong sample;
|
glong sample;
|
||||||
@ -252,4 +179,3 @@ gimp_operation_levels_map_input (GimpLevelsConfig *config,
|
|||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#define __GIMP_OPERATION_LEVELS_H__
|
#define __GIMP_OPERATION_LEVELS_H__
|
||||||
|
|
||||||
|
|
||||||
#include <gegl-plugin.h>
|
#include "gimpoperationpointfilter.h"
|
||||||
#include <operation/gegl-operation-point-filter.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OPERATION_LEVELS (gimp_operation_levels_get_type ())
|
#define GIMP_TYPE_OPERATION_LEVELS (gimp_operation_levels_get_type ())
|
||||||
@ -39,14 +38,12 @@ typedef struct _GimpOperationLevelsClass GimpOperationLevelsClass;
|
|||||||
|
|
||||||
struct _GimpOperationLevels
|
struct _GimpOperationLevels
|
||||||
{
|
{
|
||||||
GeglOperationPointFilter parent_instance;
|
GimpOperationPointFilter parent_instance;
|
||||||
|
|
||||||
GimpLevelsConfig *config;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpOperationLevelsClass
|
struct _GimpOperationLevelsClass
|
||||||
{
|
{
|
||||||
GeglOperationPointFilterClass parent_class;
|
GimpOperationPointFilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
107
app/gegl/gimpoperationpointfilter.c
Normal file
107
app/gegl/gimpoperationpointfilter.c
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
/* GIMP - The GNU Image Manipulation Program
|
||||||
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||||
|
*
|
||||||
|
* gimpoperationpointfilter.c
|
||||||
|
* Copyright (C) 2007 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 2 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, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <gegl.h>
|
||||||
|
|
||||||
|
#include "gegl-types.h"
|
||||||
|
|
||||||
|
#include "gimpoperationpointfilter.h"
|
||||||
|
|
||||||
|
|
||||||
|
static void gimp_operation_point_filter_finalize (GObject *object);
|
||||||
|
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (GimpOperationPointFilter, gimp_operation_point_filter,
|
||||||
|
GEGL_TYPE_OPERATION_POINT_FILTER)
|
||||||
|
|
||||||
|
#define parent_class gimp_operation_point_filter_parent_class
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_operation_point_filter_class_init (GimpOperationPointFilterClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
object_class->finalize = gimp_operation_point_filter_finalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_operation_point_filter_init (GimpOperationPointFilter *self)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_operation_point_filter_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GimpOperationPointFilter *self = GIMP_OPERATION_POINT_FILTER (object);
|
||||||
|
|
||||||
|
if (self->config)
|
||||||
|
{
|
||||||
|
g_object_unref (self->config);
|
||||||
|
self->config = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_operation_point_filter_get_property (GObject *object,
|
||||||
|
guint property_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GimpOperationPointFilter *self = GIMP_OPERATION_POINT_FILTER (object);
|
||||||
|
|
||||||
|
switch (property_id)
|
||||||
|
{
|
||||||
|
case GIMP_OPERATION_POINT_FILTER_PROP_CONFIG:
|
||||||
|
g_value_set_object (value, self->config);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_operation_point_filter_set_property (GObject *object,
|
||||||
|
guint property_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GimpOperationPointFilter *self = GIMP_OPERATION_POINT_FILTER (object);
|
||||||
|
|
||||||
|
switch (property_id)
|
||||||
|
{
|
||||||
|
case GIMP_OPERATION_POINT_FILTER_PROP_CONFIG:
|
||||||
|
if (self->config)
|
||||||
|
g_object_unref (self->config);
|
||||||
|
self->config = g_value_dup_object (value);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
72
app/gegl/gimpoperationpointfilter.h
Normal file
72
app/gegl/gimpoperationpointfilter.h
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
/* GIMP - The GNU Image Manipulation Program
|
||||||
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||||
|
*
|
||||||
|
* gimpoperationpointfilter.h
|
||||||
|
* Copyright (C) 2007 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 2 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, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GIMP_OPERATION_POINT_FILTER_H__
|
||||||
|
#define __GIMP_OPERATION_POINT_FILTER_H__
|
||||||
|
|
||||||
|
|
||||||
|
#include <gegl-plugin.h>
|
||||||
|
#include <operation/gegl-operation-point-filter.h>
|
||||||
|
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_0,
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define GIMP_TYPE_OPERATION_POINT_FILTER (gimp_operation_point_filter_get_type ())
|
||||||
|
#define GIMP_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_POINT_FILTER, GimpOperationPointFilter))
|
||||||
|
#define GIMP_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_OPERATION_POINT_FILTER, GimpOperationPointFilterClass))
|
||||||
|
#define GIMP_IS_OPERATION_POINT_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_POINT_FILTER))
|
||||||
|
#define GIMP_IS_OPERATION_POINT_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_OPERATION_POINT_FILTER))
|
||||||
|
#define GIMP_OPERATION_POINT_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_OPERATION_POINT_FILTER, GimpOperationPointFilterClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpOperationPointFilterClass GimpOperationPointFilterClass;
|
||||||
|
|
||||||
|
struct _GimpOperationPointFilter
|
||||||
|
{
|
||||||
|
GeglOperationPointFilter parent_instance;
|
||||||
|
|
||||||
|
GObject *config;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GimpOperationPointFilterClass
|
||||||
|
{
|
||||||
|
GeglOperationPointFilterClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GType gimp_operation_point_filter_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
void gimp_operation_point_filter_get_property (GObject *object,
|
||||||
|
guint property_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec);
|
||||||
|
void gimp_operation_point_filter_set_property (GObject *object,
|
||||||
|
guint property_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec);
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __GIMP_OPERATION_POINT_FILTER_H__ */
|
@ -32,23 +32,6 @@
|
|||||||
#include "gimpposterizeconfig.h"
|
#include "gimpposterizeconfig.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_CONFIG
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_operation_posterize_finalize (GObject *object);
|
|
||||||
static void gimp_operation_posterize_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gimp_operation_posterize_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
static gboolean gimp_operation_posterize_process (GeglOperation *operation,
|
static gboolean gimp_operation_posterize_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
@ -56,7 +39,7 @@ static gboolean gimp_operation_posterize_process (GeglOperation *operation,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpOperationPosterize, gimp_operation_posterize,
|
G_DEFINE_TYPE (GimpOperationPosterize, gimp_operation_posterize,
|
||||||
GEGL_TYPE_OPERATION_POINT_FILTER)
|
GIMP_TYPE_OPERATION_POINT_FILTER)
|
||||||
|
|
||||||
#define parent_class gimp_operation_posterize_parent_class
|
#define parent_class gimp_operation_posterize_parent_class
|
||||||
|
|
||||||
@ -68,15 +51,15 @@ gimp_operation_posterize_class_init (GimpOperationPosterizeClass * klass)
|
|||||||
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
||||||
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
||||||
|
|
||||||
object_class->finalize = gimp_operation_posterize_finalize;
|
object_class->set_property = gimp_operation_point_filter_set_property;
|
||||||
object_class->set_property = gimp_operation_posterize_set_property;
|
object_class->get_property = gimp_operation_point_filter_get_property;
|
||||||
object_class->get_property = gimp_operation_posterize_get_property;
|
|
||||||
|
|
||||||
point_class->process = gimp_operation_posterize_process;
|
point_class->process = gimp_operation_posterize_process;
|
||||||
|
|
||||||
gegl_operation_class_set_name (operation_class, "gimp-posterize");
|
gegl_operation_class_set_name (operation_class, "gimp-posterize");
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_CONFIG,
|
g_object_class_install_property (object_class,
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
|
||||||
g_param_spec_object ("config",
|
g_param_spec_object ("config",
|
||||||
"Config",
|
"Config",
|
||||||
"The config object",
|
"The config object",
|
||||||
@ -90,75 +73,22 @@ gimp_operation_posterize_init (GimpOperationPosterize *self)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_posterize_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GimpOperationPosterize *self = GIMP_OPERATION_POSTERIZE (object);
|
|
||||||
|
|
||||||
if (self->config)
|
|
||||||
{
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_posterize_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationPosterize *self = GIMP_OPERATION_POSTERIZE (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
g_value_set_object (value, self->config);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_posterize_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationPosterize *self = GIMP_OPERATION_POSTERIZE (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
if (self->config)
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = g_value_dup_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gimp_operation_posterize_process (GeglOperation *operation,
|
gimp_operation_posterize_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
glong samples)
|
glong samples)
|
||||||
{
|
{
|
||||||
GimpOperationPosterize *self = GIMP_OPERATION_POSTERIZE (operation);
|
GimpOperationPointFilter *point = GIMP_OPERATION_POINT_FILTER (operation);
|
||||||
GimpPosterizeConfig *config = self->config;
|
GimpPosterizeConfig *config = GIMP_POSTERIZE_CONFIG (point->config);
|
||||||
gfloat *src = in_buf;
|
gfloat *src = in_buf;
|
||||||
gfloat *dest = out_buf;
|
gfloat *dest = out_buf;
|
||||||
gfloat levels = config->levels - 1.0;
|
gfloat levels = config->levels - 1.0;
|
||||||
glong sample;
|
glong sample;
|
||||||
|
|
||||||
|
if (! config)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
for (sample = 0; sample < samples; sample++)
|
for (sample = 0; sample < samples; sample++)
|
||||||
{
|
{
|
||||||
dest[RED_PIX] = RINT (src[RED_PIX] * levels) / levels;
|
dest[RED_PIX] = RINT (src[RED_PIX] * levels) / levels;
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#define __GIMP_OPERATION_POSTERIZE_H__
|
#define __GIMP_OPERATION_POSTERIZE_H__
|
||||||
|
|
||||||
|
|
||||||
#include <gegl-plugin.h>
|
#include "gimpoperationpointfilter.h"
|
||||||
#include <operation/gegl-operation-point-filter.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OPERATION_POSTERIZE (gimp_operation_posterize_get_type ())
|
#define GIMP_TYPE_OPERATION_POSTERIZE (gimp_operation_posterize_get_type ())
|
||||||
@ -39,14 +38,12 @@ typedef struct _GimpOperationPosterizeClass GimpOperationPosterizeClass;
|
|||||||
|
|
||||||
struct _GimpOperationPosterize
|
struct _GimpOperationPosterize
|
||||||
{
|
{
|
||||||
GeglOperationPointFilter parent_instance;
|
GimpOperationPointFilter parent_instance;
|
||||||
|
|
||||||
GimpPosterizeConfig *config;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpOperationPosterizeClass
|
struct _GimpOperationPosterizeClass
|
||||||
{
|
{
|
||||||
GeglOperationPointFilterClass parent_class;
|
GimpOperationPointFilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,23 +31,6 @@
|
|||||||
#include "gimpthresholdconfig.h"
|
#include "gimpthresholdconfig.h"
|
||||||
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_CONFIG
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_operation_threshold_finalize (GObject *object);
|
|
||||||
static void gimp_operation_threshold_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gimp_operation_threshold_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
|
|
||||||
static gboolean gimp_operation_threshold_process (GeglOperation *operation,
|
static gboolean gimp_operation_threshold_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
@ -55,7 +38,7 @@ static gboolean gimp_operation_threshold_process (GeglOperation *operation,
|
|||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GimpOperationThreshold, gimp_operation_threshold,
|
G_DEFINE_TYPE (GimpOperationThreshold, gimp_operation_threshold,
|
||||||
GEGL_TYPE_OPERATION_POINT_FILTER)
|
GIMP_TYPE_OPERATION_POINT_FILTER)
|
||||||
|
|
||||||
#define parent_class gimp_operation_threshold_parent_class
|
#define parent_class gimp_operation_threshold_parent_class
|
||||||
|
|
||||||
@ -67,15 +50,15 @@ gimp_operation_threshold_class_init (GimpOperationThresholdClass * klass)
|
|||||||
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
||||||
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
GeglOperationPointFilterClass *point_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
|
||||||
|
|
||||||
object_class->finalize = gimp_operation_threshold_finalize;
|
object_class->set_property = gimp_operation_point_filter_set_property;
|
||||||
object_class->set_property = gimp_operation_threshold_set_property;
|
object_class->get_property = gimp_operation_point_filter_get_property;
|
||||||
object_class->get_property = gimp_operation_threshold_get_property;
|
|
||||||
|
|
||||||
point_class->process = gimp_operation_threshold_process;
|
point_class->process = gimp_operation_threshold_process;
|
||||||
|
|
||||||
gegl_operation_class_set_name (operation_class, "gimp-threshold");
|
gegl_operation_class_set_name (operation_class, "gimp-threshold");
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_CONFIG,
|
g_object_class_install_property (object_class,
|
||||||
|
GIMP_OPERATION_POINT_FILTER_PROP_CONFIG,
|
||||||
g_param_spec_object ("config",
|
g_param_spec_object ("config",
|
||||||
"Config",
|
"Config",
|
||||||
"The config object",
|
"The config object",
|
||||||
@ -89,70 +72,14 @@ gimp_operation_threshold_init (GimpOperationThreshold *self)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_threshold_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
GimpOperationThreshold *self = GIMP_OPERATION_THRESHOLD (object);
|
|
||||||
|
|
||||||
if (self->config)
|
|
||||||
{
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_threshold_get_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationThreshold *self = GIMP_OPERATION_THRESHOLD (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
g_value_set_object (value, self->config);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_operation_threshold_set_property (GObject *object,
|
|
||||||
guint property_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GimpOperationThreshold *self = GIMP_OPERATION_THRESHOLD (object);
|
|
||||||
|
|
||||||
switch (property_id)
|
|
||||||
{
|
|
||||||
case PROP_CONFIG:
|
|
||||||
if (self->config)
|
|
||||||
g_object_unref (self->config);
|
|
||||||
self->config = g_value_dup_object (value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gimp_operation_threshold_process (GeglOperation *operation,
|
gimp_operation_threshold_process (GeglOperation *operation,
|
||||||
void *in_buf,
|
void *in_buf,
|
||||||
void *out_buf,
|
void *out_buf,
|
||||||
glong samples)
|
glong samples)
|
||||||
{
|
{
|
||||||
GimpOperationThreshold *self = GIMP_OPERATION_THRESHOLD (operation);
|
GimpOperationPointFilter *point = GIMP_OPERATION_POINT_FILTER (operation);
|
||||||
GimpThresholdConfig *config = self->config;
|
GimpThresholdConfig *config = GIMP_THRESHOLD_CONFIG (point->config);
|
||||||
gfloat *src = in_buf;
|
gfloat *src = in_buf;
|
||||||
gfloat *dest = out_buf;
|
gfloat *dest = out_buf;
|
||||||
glong sample;
|
glong sample;
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
#define __GIMP_OPERATION_THRESHOLD_H__
|
#define __GIMP_OPERATION_THRESHOLD_H__
|
||||||
|
|
||||||
|
|
||||||
#include <gegl-plugin.h>
|
#include "gimpoperationpointfilter.h"
|
||||||
#include <operation/gegl-operation-point-filter.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_OPERATION_THRESHOLD (gimp_operation_threshold_get_type ())
|
#define GIMP_TYPE_OPERATION_THRESHOLD (gimp_operation_threshold_get_type ())
|
||||||
@ -39,14 +38,12 @@ typedef struct _GimpOperationThresholdClass GimpOperationThresholdClass;
|
|||||||
|
|
||||||
struct _GimpOperationThreshold
|
struct _GimpOperationThreshold
|
||||||
{
|
{
|
||||||
GeglOperationPointFilter parent_instance;
|
GimpOperationPointFilter parent_instance;
|
||||||
|
|
||||||
GimpThresholdConfig *config;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GimpOperationThresholdClass
|
struct _GimpOperationThresholdClass
|
||||||
{
|
{
|
||||||
GeglOperationPointFilterClass parent_class;
|
GimpOperationPointFilterClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user