motion-blur-circular: add property meta-data

parent eb08aa34
......@@ -36,31 +36,38 @@
#include <glib/gi18n-lib.h>
#include <math.h>
#ifdef GEGL_CHANT_PROPERTIES
gegl_chant_double_ui (center_x, _("X"),
-G_MAXDOUBLE, G_MAXDOUBLE, 20.0,
-100000.0, 100000.0, 1.0,
_("Horizontal center position"))
gegl_chant_double_ui (center_y, _("Y"),
-G_MAXDOUBLE, G_MAXDOUBLE, 20.0,
-100000.0, 100000.0, 1.0,
_("Vertical center position"))
#ifdef GEGL_PROPERTIES
gegl_property_double (center_x, "nick", _("X"),
"blurb", _("Horizontal center position"),
"default", 20.0,
"ui-min", -100000.0, "ui-max", 100000.0,
"axis", "x",
"unit", "pixel-coordinate",
NULL)
gegl_property_double (center_y, "nick", _("Y"),
"blurb", _("Vertical center position"),
"default", 20.0,
"ui-min", -100000.0, "ui-max", 100000.0,
"axis", "y",
"unit", "pixel-coordinate",
NULL)
/* FIXME: With a large angle, we lose AreaFilter's flavours */
gegl_chant_double_ui (angle, _("Angle"),
0.0, 360.0, 5.0,
0.0, 90.0, 2.0,
_("Rotation blur angle. "
"A large angle may take some time to render"))
gegl_property_double (angle, _("Angle"),
_("Rotation blur angle. A large angle may take some time to render"),
"default", 5.0, "min", 0.0, "max", 360.0,
"ui-min", 0.0, "ui-max", 90.0, "ui-gamma", 2.0,
"unit", "degree",
NULL)
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
#define GEGL_CHANT_C_FILE "motion-blur-circular.c"
#define GEGL_OP_AREA_FILTER
#define GEGL_OP_C_FILE "motion-blur-circular.c"
#include "gegl-chant.h"
#include "gegl-op.h"
#define SQR(c) ((c) * (c))
......@@ -71,7 +78,7 @@ static void
prepare (GeglOperation *operation)
{
GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle *whole_region;
gdouble angle = o->angle * G_PI / 180.0;
......@@ -152,7 +159,7 @@ process (GeglOperation *operation,
gint level)
{
GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
gfloat *in_buf, *out_buf, *out_pixel;
gint x, y;
GeglRectangle src_rect;
......@@ -264,7 +271,7 @@ process (GeglOperation *operation,
}
static void
gegl_chant_class_init (GeglChantClass *klass)
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment