operations: port ops to gegl-op.h

parent ba2f392a
......@@ -863,9 +863,11 @@ gegl_op_class_intern_init (gpointer klass)
#define property_curve(name, label, def_val) \
REGISTER_IF_ANY \
}{ GParamSpec *pspec = \
gegl_param_spec_curve (#name, label, NULL, flags);\
current_prop = PROP_##name ;
}{ GeglCurve *_gegl_op_default_curve = gegl_curve_new_default (); \
GParamSpec *pspec = \
gegl_param_spec_curve (#name, label, NULL, _gegl_op_default_curve, flags);\
current_prop = PROP_##name ;\
g_object_unref (_gegl_op_default_curve);\
#define property_color(name, label, def_val) \
REGISTER_IF_ANY \
......
......@@ -23,60 +23,52 @@
#include <glib/gi18n-lib.h>
#include <math.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
gegl_chant_register_enum (gegl_alien_map_color_model)
enum_start (gegl_alien_map_color_model)
enum_value (GEGL_ALIEN_MAP_COLOR_MODEL_RGB, "RGB")
enum_value (GEGL_ALIEN_MAP_COLOR_MODEL_HSL, "HSL")
gegl_chant_register_enum_end (GeglAlienMapColorModel)
gegl_chant_enum (color_model, _("Color model"),
GeglAlienMapColorModel,
gegl_alien_map_color_model,
GEGL_ALIEN_MAP_COLOR_MODEL_RGB,
_("What color model used for the transformation"))
gegl_chant_double (cpn_1_frequency, _("Component 1 frequency"),
0, 20, 1,
_("Component 1 frequency"))
gegl_chant_double (cpn_2_frequency, _("Component 2 frequency"),
0, 20, 1,
_("Component 2 frequency"))
gegl_chant_double (cpn_3_frequency, _("Component 3 frequency"),
0, 20, 1,
_("Component 3 frequency"))
gegl_chant_double (cpn_1_phaseshift, _("Component 1 phase shift"),
0, 360, 0,
_("Component 1 phase shift"))
gegl_chant_double (cpn_2_phaseshift, _("Component 2 phase shift"),
0, 360, 0,
_("Component 2 phase shift"))
gegl_chant_double (cpn_3_phaseshift, _("Component 3 phase shift"),
0, 360, 0,
_("Component 3 phase shift"))
gegl_chant_boolean (cpn_1_keep, _("Keep component 1"),
FALSE,
_("Keep component 1"))
gegl_chant_boolean (cpn_2_keep, _("Keep component 2"),
FALSE,
_("Keep component 2"))
gegl_chant_boolean (cpn_3_keep, _("Keep component 3"),
FALSE,
_("Keep component 3"))
enum_end (GeglAlienMapColorModel)
property_enum (color_model, _("Color model"),
GeglAlienMapColorModel, gegl_alien_map_color_model,
GEGL_ALIEN_MAP_COLOR_MODEL_RGB)
description (_("What color model used for the transformation"))
property_double (cpn_1_frequency, _("Component 1 frequency"), 1)
value_range (0, 20)
property_double (cpn_2_frequency, _("Component 2 frequency"), 1)
value_range (0, 20)
property_double (cpn_3_frequency, _("Component 3 frequency"), 1)
value_range (0, 20)
property_double (cpn_1_phaseshift, _("Component 1 phase shift"), 0)
value_range (0, 360)
ui_meta ("unit", "degree")
property_double (cpn_2_phaseshift, _("Component 2 phase shift"), 0)
value_range (0, 360)
ui_meta ("unit", "degree")
property_double (cpn_3_phaseshift, _("Component 3 phase shift"), 0)
value_range (0, 360)
ui_meta ("unit", "degree")
property_boolean (cpn_1_keep, _("Keep component 1"), FALSE)
property_boolean (cpn_2_keep, _("Keep component 2"), FALSE)
property_boolean (cpn_3_keep, _("Keep component 3"), FALSE)
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
#define GEGL_CHANT_C_FILE "alien-map.c"
#define GEGL_OP_POINT_FILTER
#define GEGL_OP_C_FILE "alien-map.c"
#include "gegl-chant.h"
#include "gegl-op.h"
static void
prepare (GeglOperation *operation)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
if (o->color_model == GEGL_ALIEN_MAP_COLOR_MODEL_RGB)
{
......@@ -102,7 +94,7 @@ process (GeglOperation *op,
const GeglRectangle *roi,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (op);
GeglProperties *o = GEGL_PROPERTIES (op);
gfloat *in = in_buf;
gfloat *out = out_buf;
gfloat freq[3];
......@@ -153,7 +145,7 @@ cl_process (GeglOperation *operation,
const GeglRectangle *roi,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
cl_float3 freq;
cl_float3 phaseshift;
cl_int3 keep;
......@@ -203,7 +195,7 @@ error:
}
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *point_filter_class;
......
......@@ -33,16 +33,16 @@
#include <glib/gi18n-lib.h>
#include <math.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
/* This operation has no properties */
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
#define GEGL_CHANT_C_FILE "antialias.c"
#define GEGL_OP_AREA_FILTER
#define GEGL_OP_C_FILE "antialias.c"
#include "gegl-chant.h"
#include "gegl-op.h"
static void
prepare (GeglOperation *operation)
......@@ -260,7 +260,7 @@ process (GeglOperation *operation,
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
......
......@@ -26,25 +26,23 @@
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
gegl_chant_double (refraction_index, _("Lens refraction index"),
1.0, 100.0, 1.7,
_("Lens refraction index"))
property_double (refraction_index, _("Lens refraction index"), 1.7)
value_range (1.0, 100.0)
gegl_chant_boolean (keep_surroundings, _("Keep original surroundings"),
FALSE,
_("Keep image unchanged, where not affected by the lens."))
property_boolean (keep_surroundings, _("Keep original surroundings"), FALSE)
description(_("Keep image unchanged, where not affected by the lens."))
property_color (background_color, _("Background Color"), "none")
//ui_meta ("role", "color-secondary")
gegl_chant_color (background_color, _("Background Color"),
"none",
_("Background Color (defaults to 'none')"))
#else
#define GEGL_CHANT_TYPE_FILTER
#define GEGL_CHANT_C_FILE "apply-lens.c"
#define GEGL_OP_FILTER
#define GEGL_OP_C_FILE "apply-lens.c"
#include "gegl-chant.h"
#include "gegl-op.h"
#include <math.h>
#include <stdio.h>
......@@ -136,7 +134,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
const Babl *input_format = gegl_buffer_get_format (input);
const int bytes_per_pixel = babl_format_get_bytes_per_pixel (input_format);
......@@ -269,7 +267,7 @@ process (GeglOperation *operation,
}
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
......
......@@ -28,22 +28,22 @@
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
gegl_chant_double (r_sigma, _("Smoothness"),
1, 100, 50,
_("Level of smoothness"))
property_double (r_sigma, _("Smoothness"), 50)
description(_("Level of smoothness"))
value_range (1, 100)
gegl_chant_int (s_sigma, _("Blur radius"),
1, 100, 8,
_("Radius of square pixel region, (width and height will be radius*2+1)."))
property_int (s_sigma, _("Blur radius"), 8)
description(_("Radius of square pixel region, (width and height will be radius*2+1)."))
value_range (1, 100)
#else
#define GEGL_CHANT_TYPE_FILTER
#define GEGL_CHANT_C_FILE "bilateral-filter-fast.c"
#define GEGL_OP_FILTER
#define GEGL_OP_C_FILE "bilateral-filter-fast.c"
#include "gegl-chant.h"
#include "gegl-op.h"
#include <math.h>
inline static float lerp(float a, float b, float v)
......@@ -100,7 +100,7 @@ bilateral_process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
if (gegl_operation_use_opencl (operation))
if (bilateral_cl_process (operation, input, output, result, o->s_sigma, o->r_sigma/100))
......@@ -472,7 +472,7 @@ bilateral_cl_process (GeglOperation *operation,
}
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
......
......@@ -21,20 +21,24 @@
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
property_double (blur_radius, _("Blur radius"), 4.0)
description(_("Radius of square pixel region, (width and height will be radius*2+1)."))
value_range (0.0, 1000.0)
ui_range (0.0, 100.0)
ui_gamma (1.5)
gegl_chant_double_ui (blur_radius, _("Blur radius"), 0.0, 1000.0, 4.0, 0.0, 100.0, 1.5,
_("Radius of square pixel region, (width and height will be radius*2+1)."))
gegl_chant_double (edge_preservation, _("Edge preservation"), 0.0, 100.0, 8.0,
_("Amount of edge preservation"))
property_double (edge_preservation, _("Edge preservation"), 8.0)
description (_("Amount of edge preservation"))
value_range (0.0, 100.0)
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
#define GEGL_CHANT_C_FILE "bilateral-filter.c"
#define GEGL_OP_AREA_FILTER
#define GEGL_OP_C_FILE "bilateral-filter.c"
#include "gegl-chant.h"
#include "gegl-op.h"
#include <math.h>
static void
......@@ -50,7 +54,7 @@ bilateral_filter (GeglBuffer *src,
static void prepare (GeglOperation *operation)
{
GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
area->left = area->right = area->top = area->bottom = ceil (o->blur_radius);
gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
......@@ -117,7 +121,7 @@ cl_process (GeglOperation *operation,
gint err;
GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,
result,
......@@ -159,7 +163,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle compute;
if (o->blur_radius >= 1.0 && gegl_operation_use_opencl (operation))
......@@ -266,7 +270,7 @@ bilateral_filter (GeglBuffer *src,
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
......
......@@ -20,17 +20,20 @@
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
gegl_chant_int_ui (radius, _("Radius"), 0, 1000, 4, 0, 100, 1.5,
_("Radius of square pixel region, (width and height will be radius*2+1)"))
property_int (radius, _("Radius"), 4)
description(_("Radius of square pixel region, (width and height will be radius*2+1)"))
value_range (0, 1000)
ui_range (0, 100)
ui_gamma (1.5)
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
#define GEGL_CHANT_C_FILE "box-blur.c"
#define GEGL_OP_AREA_FILTER
#define GEGL_OP_C_FILE "box-blur.c"
#include "gegl-chant.h"
#include "gegl-op.h"
#include <stdio.h>
#include <math.h>
......@@ -161,11 +164,11 @@ ver_blur (GeglBuffer *src,
static void prepare (GeglOperation *operation)
{
GeglChantO *o;
GeglProperties *o;
GeglOperationAreaFilter *op_area;
op_area = GEGL_OPERATION_AREA_FILTER (operation);
o = GEGL_CHANT_PROPERTIES (operation);
o = GEGL_PROPERTIES (operation);
op_area->left =
op_area->right =
......@@ -285,7 +288,7 @@ cl_process (GeglOperation *operation,
gint err = 0;
GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,
result,
......@@ -339,7 +342,7 @@ process (GeglOperation *operation,
{
GeglRectangle rect;
GeglRectangle tmprect;
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
GeglBuffer *temp;
GeglOperationAreaFilter *op_area;
op_area = GEGL_OPERATION_AREA_FILTER (operation);
......@@ -372,7 +375,7 @@ process (GeglOperation *operation,
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
......
......@@ -20,19 +20,19 @@
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
gegl_chant_pointer (buffer, _("Buffer location"),
property_pointer (buffer, _("Buffer location"),
_("The location where to store the output GeglBuffer"))
gegl_chant_pointer (format, _("babl format"),
property_pointer (format, _("babl format"),
_("The babl format of the output GeglBuffer, NULL to use input buffer format"))
#else
#define GEGL_CHANT_TYPE_SINK
#define GEGL_CHANT_C_FILE "buffer-sink.c"
#define GEGL_OP_SINK
#define GEGL_OP_C_FILE "buffer-sink.c"
#include "gegl-chant.h"
#include "gegl-op.h"
static gboolean
process (GeglOperation *operation,
......@@ -40,7 +40,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
if (o->buffer != NULL &&
(o->format == NULL || o->format == gegl_buffer_get_format (input)))
......@@ -66,7 +66,7 @@ process (GeglOperation *operation,
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSinkClass *sink_class;
......
......@@ -20,17 +20,17 @@
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
gegl_chant_object(buffer, _("Input buffer"),
_("The GeglBuffer to load into the pipeline"))
property_object(buffer, _("Input buffer"), GEGL_TYPE_BUFFER)
description (_("The GeglBuffer to load into the pipeline"))
#else
#define GEGL_CHANT_TYPE_SOURCE
#define GEGL_CHANT_C_FILE "buffer-source.c"
#define GEGL_OP_SOURCE
#define GEGL_OP_C_FILE "buffer-source.c"
#include "gegl-chant.h"
#include "gegl-op.h"
typedef struct
{
......@@ -38,12 +38,12 @@ typedef struct
} Priv;
static Priv *
get_priv (GeglChantO *o)
get_priv (GeglProperties *o)
{
Priv *priv = (Priv*)o->chant_data;
Priv *priv = (Priv*)o->user_data;
if (priv == NULL) {
priv = g_new0 (Priv, 1);
o->chant_data = (void*) priv;
o->user_data = (void*) priv;
priv->buffer_changed_handler = 0;
}
......@@ -62,7 +62,7 @@ static void
gegl_buffer_source_prepare (GeglOperation *operation)
{
const Babl *format = NULL;
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
if (o->buffer)
format = gegl_buffer_get_format (GEGL_BUFFER (o->buffer));
......@@ -74,7 +74,7 @@ static GeglRectangle
get_bounding_box (GeglOperation *operation)
{
GeglRectangle result = {0,0,0,0};
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
if (!o->buffer)
{
......@@ -91,7 +91,7 @@ my_set_property (GObject *gobject,
GParamSpec *pspec)
{
GeglOperation *operation = GEGL_OPERATION (gobject);
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
Priv *p = get_priv(o);
GObject *buffer = NULL;
......@@ -124,7 +124,7 @@ process (GeglOperation *operation,
const GeglRectangle *result,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
if (o->buffer)
{
......@@ -147,7 +147,7 @@ process (GeglOperation *operation,
static void
dispose (GObject *object)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (object);
GeglProperties *o = GEGL_PROPERTIES (object);
Priv *p = get_priv(o);
if (o->buffer)
......@@ -161,15 +161,15 @@ dispose (GObject *object)
if (p) {
g_free(p);
o->chant_data = NULL;
o->user_data = NULL;
}
G_OBJECT_CLASS (gegl_chant_parent_class)->dispose (object);
G_OBJECT_CLASS (gegl_op_parent_class)->dispose (object);
}
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
......
......@@ -34,65 +34,62 @@
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
gegl_chant_register_enum (gegl_bump_map_type)
enum_start (gegl_bump_map_type)
enum_value (GEGL_BUMP_MAP_TYPE_LINEAR, "Linear")
enum_value (GEGL_BUMP_MAP_TYPE_SPHERICAL, "Cosinus")
enum_value (GEGL_BUMP_MAP_TYPE_SINUSOIDAL, "Sinusoidal")
gegl_chant_register_enum_end (GeglBumpMapType)
enum_end (GeglBumpMapType)
gegl_chant_enum (type, _("Type"),
GeglBumpMapType, gegl_bump_map_type,
GEGL_BUMP_MAP_TYPE_LINEAR,
_("Type of map"))
property_enum (type, _("Type"), GeglBumpMapType, gegl_bump_map_type,
GEGL_BUMP_MAP_TYPE_LINEAR)
description (_("Type of map"))
gegl_chant_boolean (compensate, _("Compensate"),
TRUE,
_("Compensate for darkening"))
property_boolean (compensate, _("Compensate"), TRUE)
description (_("Compensate for darkening"))
gegl_chant_boolean (invert, _("Invert"),
FALSE,
_("Invert bumpmap"))
property_boolean (invert, _("Invert"), FALSE)
description (_("Invert bumpmap"))
gegl_chant_boolean (tiled, _("Tiled"),
FALSE,
_("Tiled bumpmap"))
property_boolean (tiled, _("Tiled"), FALSE)
description (_("Tiled bumpmap"))
gegl_chant_double (azimuth, _("Azimuth"),
0.0, 360.0, 135.0,
_("Azimuth"))
property_double (azimuth, _("Azimuth"), 135.0)
value_range (0.0, 360.0)
ui_meta ("unit", "degree")
gegl_chant_double (elevation, _("Elevation"),
0.0, 360.0, 45.0,
_("Elevation"))
property_double (elevation, _("Elevation"), 45.0)
value_range (0.0, 360.0)
gegl_chant_double (depth, _("Depth"),
0.0005, 100, 0.005,
_("Depth"))
property_double (depth, _("Depth"), 0.005)
value_range (0.0005, 100)
gegl_chant_int_ui (offset_x, _("Offset X"),
-20000, 20000,0, -1000.0, 1000.0, 1.0,
NULL)
property_int (offset_x, _("Offset X"), -1000.0)
value_range (-20000, 20000)
ui_range (-1000.0, 1000.0)
ui_meta ("axis", "x")
ui_meta ("unit", "pixel-coordinate")
gegl_chant_int_ui (offset_y, _("Offset Y"),
-20000, 20000,0, -1000.0, 1000.0, 1.0,
NULL)
property_int (offset_y, _("Offset Y"), -1000.0)
value_range (-20000, 20000)
ui_range (-1000.0, 1000.0)
ui_meta ("axis", "y")
ui_meta ("unit", "pixel-coordinate")
gegl_chant_double (waterlevel, _("Waterlevel"),
0.0,1.0,0.0,
_("Level that full transparency should represent"))
property_double (waterlevel, _("Waterlevel"), 0.0)
description(_("Level that full transparency should represent"))
value_range (0.0, 1.0)
gegl_chant_double (ambient, _("Ambient"),
0.0, 1.0, 0.0,
_("Ambient lighting factor"))
property_double (ambient, _("Ambient lighting factor"), 0.0)
value_range (0.0, 1.0)
#else
#define GEGL_CHANT_TYPE_COMPOSER
#define GEGL_CHANT_C_FILE "bump-map.c"
#define GEGL_OP_COMPOSER
#define GEGL_OP_C_FILE "bump-map.c"
#include "gegl-chant.h"
#include "gegl-op.h"
#include <math.h>
/***** Macros *****/
......@@ -114,7 +111,7 @@ typedef struct
} bumpmap_params_t;
static void
bumpmap_setup_calc (GeglChantO *o,
bumpmap_setup_calc (GeglProperties *o,
bumpmap_params_t *params)
{
/* Convert to radians */
......@@ -180,7 +177,7 @@ bumpmap_row (const gfloat *src,
gint bm_width,
gint bm_xofs,
gboolean row_in_bumpmap,
GeglChantO *o,
GeglProperties *o,
bumpmap_params_t *params)
{
gint xofs1, xofs2, xofs3;
......@@ -298,7 +295,7 @@ process (GeglOperation *operation,
const GeglRectangle *rect,
gint level)
{
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
gfloat *src_buf, *dst_buf, *bm_row1, *bm_row2, *bm_row3, *src_row, *dest_row, *bm_tmprow;
const Babl *format = gegl_operation_get_format (operation, "output");
gint channels = babl_format_get_n_components (format);
......@@ -459,7 +456,7 @@ get_bounding_box (GeglOperation *self)
}
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationComposerClass *composer_class;
......
......@@ -22,34 +22,38 @@
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
#ifdef GEGL_PROPERTIES
gegl_chant_int_ui (radius, _("Radius"),
2, 3000, 300, 2, 3000, 1.6,
_("Neighborhood taken into account, this is the radius "
property_int (radius, _("Radius"), 300)
description(_("Neighborhood taken into account, this is the radius "
"in pixels taken into account when deciding which "
"colors map to which gray values"))
gegl_chant_int_ui (samples, _("Samples"),
1, 1000, 4, 1, 20, 1.0,
_("Number of samples to do per iteration looking for "
"the range of colors"))
gegl_chant_int_ui (iterations, _("Iterations"),
1, 1000, 10, 1, 20, 1.0,
_("Number of iterations, a higher number of iterations "
value_range (2, 3000)
ui_range (2, 1000)
ui_gamma (1.6)
ui_meta ("unit", "pixel-distance")
property_int (samples, _("Samples"), 4)
description (_("Number of samples to do per iteration looking for the range of colors"))