[gegl] operations: clean up translatable op descriptions
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations: clean up translatable op descriptions
- Date: Mon, 20 May 2013 14:05:34 +0000 (UTC)
commit 08287da809f1ff41501c331ad18e8c615c395b98
Author: Michael Natterer <mitch gimp org>
Date: Mon May 20 16:03:27 2013 +0200
operations: clean up translatable op descriptions
because they will soon be used in GIMP's UI. Also did some general
formatting cleanup, particulatly format chanted properties
consistently.
operations/common/c2g.c | 41 ++++++++-----
operations/common/cartoon.c | 21 ++++---
operations/common/checkerboard.c | 43 ++++++++-----
operations/common/color-reduction.c | 35 ++++++++----
operations/common/color-temperature.c | 22 ++++---
operations/common/color-to-alpha.c | 17 +++--
operations/common/cubism.c | 3 +-
operations/common/difference-of-gaussians.c | 21 ++++---
operations/common/dot.c | 23 ++++---
operations/common/edge-laplace.c | 13 ++--
operations/common/edge-sobel.c | 25 ++++----
operations/common/emboss.c | 4 +-
operations/common/exposure.c | 40 ++++++++-----
operations/common/gaussian-blur.c | 35 ++++++-----
operations/common/lens-distortion.c | 42 ++++++++-----
operations/common/mono-mixer.c | 25 +++++---
operations/common/noise-cielch.c | 34 +++++++----
operations/common/noise-hsv.c | 24 +++++---
operations/common/noise-hurl.c | 20 ++++---
operations/common/noise-pick.c | 18 +++---
operations/common/noise-rgb.c | 45 ++++++++++----
operations/common/noise-slur.c | 20 ++++---
operations/common/photocopy.c | 22 ++++---
operations/common/pixelize.c | 29 +++++----
operations/common/polar-coordinates.c | 60 ++++++++++++------
operations/common/red-eye-removal.c | 8 +-
operations/common/ripple.c | 57 ++++++++++--------
operations/common/softglow.c | 22 ++++---
operations/common/unsharp-mask.c | 28 +++++----
operations/common/vignette.c | 86 +++++++++++++++++++--------
operations/common/whirl-pinch.c | 8 +-
31 files changed, 548 insertions(+), 343 deletions(-)
---
diff --git a/operations/common/c2g.c b/operations/common/c2g.c
index e295db0..14df6f3 100644
--- a/operations/common/c2g.c
+++ b/operations/common/c2g.c
@@ -24,12 +24,21 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_int_ui (radius, _("Radius"), 2, 3000, 300, 2, 3000, 1.6,
- _("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 provides less noisy results at a
computational cost"))
+gegl_chant_int_ui (radius, _("Radius"),
+ 2, 3000, 300, 2, 3000, 1.6,
+ _("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 "
+ "provides less noisy results at a computational cost"))
/*
gegl_chant_double (rgamma, _("Radial Gamma"), 0.0, 8.0, 2.0,
@@ -38,7 +47,7 @@ gegl_chant_double (rgamma, _("Radial Gamma"), 0.0, 8.0, 2.0,
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "c2g.c"
+#define GEGL_CHANT_C_FILE "c2g.c"
#include "gegl-chant.h"
#include <math.h>
@@ -312,8 +321,8 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
- filter_class->process = process;
- operation_class->prepare = prepare;
+ filter_class->process = process;
+ operation_class->prepare = prepare;
/* we override defined region to avoid growing the size of what is defined
* by the filter. This also allows the tricks used to treat alpha==0 pixels
@@ -325,13 +334,13 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->opencl_support = TRUE;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:c2g",
- "categories", "enhance",
- "description",
- _("Color to grayscale conversion, uses envelopes formed from spatial "
- "color differences to perform color-feature preserving grayscale "
- "spatial contrast enhancement"),
- NULL);
+ "name", "gegl:c2g",
+ "categories", "enhance",
+ "description",
+ _("Color to grayscale conversion, uses envelopes formed from spatial "
+ "color differences to perform color-feature preserving grayscale "
+ "spatial contrast enhancement"),
+ NULL);
}
#endif
diff --git a/operations/common/cartoon.c b/operations/common/cartoon.c
index 393bd7a..2424171 100644
--- a/operations/common/cartoon.c
+++ b/operations/common/cartoon.c
@@ -22,14 +22,18 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double (mask_radius, _("Mask radius"), 0.0, 50.0, 7.0, _("Mask radius"))
+gegl_chant_double (mask_radius, _("Mask radius"),
+ 0.0, 50.0, 7.0,
+ _("Mask radius"))
-gegl_chant_double (pct_black, _("Percent black"), 0.0, 1.0, 0.2, _("Percent black"))
+gegl_chant_double (pct_black, _("Percent black"),
+ 0.0, 1.0, 0.2,
+ _("Percent black"))
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "cartoon.c"
+#define GEGL_CHANT_C_FILE "cartoon.c"
#include "gegl-chant.h"
#include <stdio.h>
@@ -361,20 +365,19 @@ gegl_chant_class_init (GeglChantClass *klass)
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
-
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
- object_class->finalize = finalize;
+ object_class->finalize = finalize;
operation_class->prepare = prepare;
filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "categories" , "artistic",
- "name" , "gegl:cartoon",
- "description", _("Cartoon effect"),
- NULL);
+ "categories", "artistic",
+ "name", "gegl:cartoon",
+ "description", _("Simulate a cartoon by enhancing edges"),
+ NULL);
}
#endif
diff --git a/operations/common/checkerboard.c b/operations/common/checkerboard.c
index de3089f..3e0ae56 100644
--- a/operations/common/checkerboard.c
+++ b/operations/common/checkerboard.c
@@ -22,23 +22,34 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_int_ui (x, _("Width"), 1, G_MAXINT, 16, 1, 256, 1.5,
- _("Horizontal width of cells pixels"))
-gegl_chant_int_ui (y, _("Height"), 1, G_MAXINT, 16, 1, 256, 1.5,
- _("Vertical width of cells in pixels"))
-gegl_chant_int_ui (x_offset, _("X offset"), -G_MAXINT, G_MAXINT, 0, -10, 10, 1.0,
- _("Horizontal offset (from origin) for start of grid"))
-gegl_chant_int_ui (y_offset, _("Y offset"), -G_MAXINT, G_MAXINT, 0, -10, 10, 1.0,
- _("Vertical offset (from origin) for start of grid"))
-gegl_chant_color (color1, _("Color"), "black",
- _("One of the cell colors (defaults to 'black')"))
-gegl_chant_color (color2, _("Other color"), "white",
- _("The other cell color (defaults to 'white')"))
+gegl_chant_int_ui (x, _("Width"),
+ 1, G_MAXINT, 16, 1, 256, 1.5,
+ _("Horizontal width of cells pixels"))
+
+gegl_chant_int_ui (y, _("Height"),
+ 1, G_MAXINT, 16, 1, 256, 1.5,
+ _("Vertical width of cells in pixels"))
+
+gegl_chant_int_ui (x_offset, _("X offset"),
+ -G_MAXINT, G_MAXINT, 0, -10, 10, 1.0,
+ _("Horizontal offset (from origin) for start of grid"))
+
+gegl_chant_int_ui (y_offset, _("Y offset"),
+ -G_MAXINT, G_MAXINT, 0, -10, 10, 1.0,
+ _("Vertical offset (from origin) for start of grid"))
+
+gegl_chant_color (color1, _("Color"),
+ "black",
+ _("One of the cell colors (defaults to 'black')"))
+
+gegl_chant_color (color2, _("Other color"),
+ "white",
+ _("The other cell color (defaults to 'white')"))
#else
#define GEGL_CHANT_TYPE_POINT_RENDER
-#define GEGL_CHANT_C_FILE "checkerboard.c"
+#define GEGL_CHANT_C_FILE "checkerboard.c"
#include "gegl-chant.h"
@@ -141,9 +152,9 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->prepare = prepare;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:checkerboard",
- "categories", "render",
- "description", _("Checkerboard renderer"),
+ "name", "gegl:checkerboard",
+ "categories", "render",
+ "description", _("Create a checkerboard pattern"),
NULL);
}
diff --git a/operations/common/color-reduction.c b/operations/common/color-reduction.c
index 6ff09b7..7d3aefb 100644
--- a/operations/common/color-reduction.c
+++ b/operations/common/color-reduction.c
@@ -32,13 +32,25 @@ gegl_chant_register_enum (gegl_dither_strategy)
enum_value (GEGL_DITHER_FLOYD_STEINBERG, "Floyd-Steinberg")
gegl_chant_register_enum_end (GeglDitherStrategy)
-gegl_chant_int (red_bits, _("Red bits"), 1, 16, 8, _("Number of bits for red channel"))
-gegl_chant_int (green_bits, _("Green bits"), 1, 16, 8, _("Number of bits for green channel"))
-gegl_chant_int (blue_bits, _("Blue bits"), 1, 16, 8, _("Number of bits for blue channel"))
-gegl_chant_int (alpha_bits, _("Alpha bits"), 1, 16, 8, _("Number of bits for alpha channel"))
+gegl_chant_int (red_bits, _("Red bits"),
+ 1, 16, 8,
+ _("Number of bits for red channel"))
-gegl_chant_enum (dither_strategy, _("Dithering Strategy"), GeglDitherStrategy,
- gegl_dither_strategy, GEGL_DITHER_RESILIENT, _("The dithering strategy to use"))
+gegl_chant_int (green_bits, _("Green bits"),
+ 1, 16, 8,
+ _("Number of bits for green channel"))
+
+gegl_chant_int (blue_bits, _("Blue bits"),
+ 1, 16, 8,
+ _("Number of bits for blue channel"))
+
+gegl_chant_int (alpha_bits, _("Alpha bits"),
+ 1, 16, 8,
+ _("Number of bits for alpha channel"))
+
+gegl_chant_enum (dither_strategy, _("Dithering Strategy"),
+ GeglDitherStrategy, gegl_dither_strategy, GEGL_DITHER_RESILIENT,
+ _("The dithering strategy to use"))
#else
@@ -574,12 +586,13 @@ gegl_chant_class_init (GeglChantClass *klass)
filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:color-reduction",
- "categories" , "misc",
- "description" ,
- _("Reduces the number of bits per channel (colors and alpha), with optional dithering"),
+ "name", "gegl:color-reduction",
+ "categories", "misc",
+ "description", _("Reduce the number of colors in the image, by reducing "
+ "the bits per channel (colors and alpha), with optional "
+ "dithering"),
"reference-composition", composition,
- NULL);
+ NULL);
}
#endif
diff --git a/operations/common/color-temperature.c b/operations/common/color-temperature.c
index b52bb08..068dff9 100644
--- a/operations/common/color-temperature.c
+++ b/operations/common/color-temperature.c
@@ -24,13 +24,20 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double (original_temperature, _("Original temperature"), LOWEST_TEMPERATURE, HIGHEST_TEMPERATURE,
6500, _("Estimated temperature of the light source in Kelvin the image was taken with."))
-gegl_chant_double (intended_temperature, _("Intended temperature"), LOWEST_TEMPERATURE, HIGHEST_TEMPERATURE,
6500, _("Corrected estimation of the temperature of the light source in Kelvin."))
+gegl_chant_double (original_temperature, _("Original temperature"),
+ LOWEST_TEMPERATURE, HIGHEST_TEMPERATURE, 6500,
+ _("Estimated temperature of the light source in Kelvin "
+ "the image was taken with."))
+
+gegl_chant_double (intended_temperature, _("Intended temperature"),
+ LOWEST_TEMPERATURE, HIGHEST_TEMPERATURE, 6500,
+ _("Corrected estimation of the temperature of the light "
+ "source in Kelvin."))
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "color-temperature.c"
+#define GEGL_CHANT_C_FILE "color-temperature.c"
#include "gegl-chant.h"
@@ -261,16 +268,15 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->prepare = prepare;
- point_filter_class->process = process;
+ point_filter_class->process = process;
point_filter_class->cl_process = cl_process;
operation_class->opencl_support = TRUE;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:color-temperature",
- "categories" , "color",
- "description",
- _("Allows changing the color temperature of an image."),
+ "name", "gegl:color-temperature",
+ "categories", "color",
+ "description", _("Change the color temperature of the image"),
"reference-composition", composition,
NULL);
}
diff --git a/operations/common/color-to-alpha.c b/operations/common/color-to-alpha.c
index 01406c8..aae21c4 100644
--- a/operations/common/color-to-alpha.c
+++ b/operations/common/color-to-alpha.c
@@ -25,19 +25,21 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_color (color, _("Color"), "white",
+gegl_chant_color (color, _("Color"),
+ "white",
_("The color to render (defaults to 'white')"))
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "color-to-alpha.c"
+#define GEGL_CHANT_C_FILE "color-to-alpha.c"
#include "gegl-chant.h"
#include <stdio.h>
#include <math.h>
-static void prepare (GeglOperation *operation)
+static void
+prepare (GeglOperation *operation)
{
gegl_operation_set_format (operation, "input",
babl_format ("R'G'B'A double"));
@@ -163,7 +165,8 @@ gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *filter_class;
- gchar *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
"<gegl>"
"<node operation='svg:dst-over'>"
" <node operation='gegl:crop'>"
@@ -192,9 +195,9 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->prepare = prepare;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:color-to-alpha",
- "categories" , "color",
- "description", _("Performs color-to-alpha on the image."),
+ "name", "gegl:color-to-alpha",
+ "categories", "color",
+ "description", _("Convert a specified color to transparency"),
"reference-composition", composition,
NULL);
}
diff --git a/operations/common/cubism.c b/operations/common/cubism.c
index 2b63b29..6814907 100644
--- a/operations/common/cubism.c
+++ b/operations/common/cubism.c
@@ -42,8 +42,7 @@ gegl_chant_color (bg_color, _("Background Color"),
gegl_chant_seed (seed, _("Seed"),
_("Random seed"))
-
-# else
+#else
#define GEGL_CHANT_TYPE_AREA_FILTER
#define GEGL_CHANT_C_FILE "cubism.c"
diff --git a/operations/common/difference-of-gaussians.c b/operations/common/difference-of-gaussians.c
index a7e11ab..8642c2e 100644
--- a/operations/common/difference-of-gaussians.c
+++ b/operations/common/difference-of-gaussians.c
@@ -19,18 +19,20 @@
#include "config.h"
#include <glib/gi18n-lib.h>
-
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double_ui (radius1, _("Radius 1"), 0.0, 1000.0, 1.0, 0.0, 10.0, 1.5,
+gegl_chant_double_ui (radius1, _("Radius 1"),
+ 0.0, 1000.0, 1.0, 0.0, 10.0, 1.5,
_("Radius"))
-gegl_chant_double_ui (radius2, _("Radius 2"), 0.0, 1000.0, 2.0, 0.0, 10.0, 1.5,
+
+gegl_chant_double_ui (radius2, _("Radius 2"),
+ 0.0, 1000.0, 2.0, 0.0, 10.0, 1.5,
_("Radius"))
#else
#define GEGL_CHANT_TYPE_META
-#define GEGL_CHANT_C_FILE "difference-of-gaussians.c"
+#define GEGL_CHANT_C_FILE "difference-of-gaussians.c"
#include "gegl-chant.h"
@@ -92,14 +94,15 @@ gegl_chant_class_init (GeglChantClass *klass)
GeglOperationClass *operation_class;
operation_class = GEGL_OPERATION_CLASS (klass);
+
operation_class->attach = attach;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:difference-of-gaussians",
- "categories" , "meta:edge",
- "description",
- _("Does an edge detection based on the difference of two gaussian blurs."),
- NULL);
+ "name", "gegl:difference-of-gaussians",
+ "categories", "meta:edge",
+ "description", _("Edge detection with control of edge thickness, based "
+ "on the difference of two gaussian blurs"),
+ NULL);
}
#endif
diff --git a/operations/common/dot.c b/operations/common/dot.c
index 0d9df4d..3531273 100644
--- a/operations/common/dot.c
+++ b/operations/common/dot.c
@@ -23,15 +23,18 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_int_ui (size, _("Block Width"), 1, 123456, 16, 1, 1024, 1.5,
- _("Size of each block in pixels"))
-gegl_chant_double(ratio, _("Dot size ratio"), 0.0, 1.0, 1.0,
- _("Size ratio of a dot inside each block"))
+gegl_chant_int_ui (size, _("Block Width"),
+ 1, 123456, 16, 1, 1024, 1.5,
+ _("Size of each block in pixels"))
+
+gegl_chant_double (ratio, _("Dot size ratio"),
+ 0.0, 1.0, 1.0,
+ _("Size ratio of a dot inside each block"))
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "dot.c"
+#define GEGL_CHANT_C_FILE "dot.c"
#include "gegl-chant.h"
@@ -39,7 +42,8 @@ gegl_chant_double(ratio, _("Dot size ratio"), 0.0, 1.0, 1.0,
#define CELL_Y(py, cell_height) ((py) / (cell_height))
-static void prepare (GeglOperation *operation)
+static void
+prepare (GeglOperation *operation)
{
GeglChantO *o;
GeglOperationAreaFilter *op_area;
@@ -185,10 +189,9 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->prepare = prepare;
gegl_operation_class_set_keys (operation_class,
- "categories" , "render",
- "name" , "gegl:dot",
- "description",
- _("Simplify image into an array of solid-colored dots"),
+ "name", "gegl:dot",
+ "categories", "render",
+ "description", _("Simplify image into an array of solid-colored dots"),
NULL);
}
diff --git a/operations/common/edge-laplace.c b/operations/common/edge-laplace.c
index b12e5e4..a8232fa 100644
--- a/operations/common/edge-laplace.c
+++ b/operations/common/edge-laplace.c
@@ -28,7 +28,7 @@
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "edge-laplace.c"
+#define GEGL_CHANT_C_FILE "edge-laplace.c"
#include "gegl-chant.h"
#include <math.h>
@@ -43,12 +43,14 @@ edge_laplace (GeglBuffer *src,
#include <stdio.h>
-static void prepare (GeglOperation *operation)
+static void
+prepare (GeglOperation *operation)
{
GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
//GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
area->left = area->right = area->top = area->bottom = LAPLACE_RADIUS;
+
gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
}
@@ -512,10 +514,9 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->opencl_support = TRUE;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:edge-laplace",
- "categories" , "edge-detect",
- "description" ,
- _("High-resolution edge detection"),
+ "name", "gegl:edge-laplace",
+ "categories", "edge-detect",
+ "description", _("High-resolution edge detection"),
NULL);
}
diff --git a/operations/common/edge-sobel.c b/operations/common/edge-sobel.c
index e978138..2ebc65f 100644
--- a/operations/common/edge-sobel.c
+++ b/operations/common/edge-sobel.c
@@ -22,22 +22,24 @@
#include "config.h"
#include <glib/gi18n-lib.h>
-
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_boolean (horizontal, _("Horizontal"), TRUE,
+gegl_chant_boolean (horizontal, _("Horizontal"),
+ TRUE,
_("Horizontal"))
-gegl_chant_boolean (vertical, _("Vertical"), TRUE,
+gegl_chant_boolean (vertical, _("Vertical"),
+ TRUE,
_("Vertical"))
-gegl_chant_boolean (keep_signal, _("Keep Signal"), TRUE,
+gegl_chant_boolean (keep_signal, _("Keep Signal"),
+ TRUE,
_("Keep Signal"))
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "edge-sobel.c"
+#define GEGL_CHANT_C_FILE "edge-sobel.c"
#include "gegl-chant.h"
#include <math.h>
@@ -364,16 +366,15 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
- filter_class->process = process;
- operation_class->prepare = prepare;
-
+ operation_class->prepare = prepare;
operation_class->opencl_support = TRUE;
+ filter_class->process = process;
+
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:edge-sobel",
- "categories" , "edge-detect",
- "description",
- _("Specialized direction-dependent edge detection"),
+ "name", "gegl:edge-sobel",
+ "categories", "edge-detect",
+ "description", _("Specialized direction-dependent edge detection"),
NULL);
}
diff --git a/operations/common/emboss.c b/operations/common/emboss.c
index bf8f200..3ae1813 100644
--- a/operations/common/emboss.c
+++ b/operations/common/emboss.c
@@ -252,8 +252,8 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->prepare = prepare;
gegl_operation_class_set_keys (operation_class,
- "categories" , "distort",
- "name" , "gegl:emboss",
+ "name", "gegl:emboss",
+ "categories", "distort",
"description", _("Simulates an image created by embossing"),
NULL);
}
diff --git a/operations/common/exposure.c b/operations/common/exposure.c
index 1b2a16d..0c5d846 100644
--- a/operations/common/exposure.c
+++ b/operations/common/exposure.c
@@ -17,21 +17,27 @@
* 2013 Øyvind Kolås <pippin gimp org>
*/
-
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double_ui (exposure, _("Exposure"), -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, -10.0, 10.0, 1.0,
- _("Relative brightness change in stops"))
-gegl_chant_double_ui (offset, _("Offset"), -0.5, 0.5, 0.0, -0.5, 0.5, 1.0,
- _("Offset value added"))
-gegl_chant_double_ui (gamma, _("Gamma"), 0.01, 10, 1.0, 0.01, 3.0, 1.0,
- _("Gamma correction"))
+
+gegl_chant_double_ui (exposure, _("Exposure"),
+ -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, -10.0, 10.0, 1.0,
+ _("Relative brightness change in stops"))
+
+gegl_chant_double_ui (offset, _("Offset"),
+ -0.5, 0.5, 0.0, -0.5, 0.5, 1.0,
+ _("Offset value added"))
+
+gegl_chant_double_ui (gamma, _("Gamma"),
+ 0.01, 10, 1.0, 0.01, 3.0, 1.0,
+ _("Gamma correction"))
+
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "exposure.c"
+#define GEGL_CHANT_C_FILE "exposure.c"
#include "gegl-chant.h"
@@ -40,7 +46,8 @@ gegl_chant_double_ui (gamma, _("Gamma"), 0.01, 10, 1.0, 0.01, 3.0, 1.0,
#define powf(a,b) ((gfloat)pow(a,b))
#endif
-static void prepare (GeglOperation *operation)
+static void
+prepare (GeglOperation *operation)
{
gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
@@ -168,16 +175,17 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- point_filter_class->process = process;
- point_filter_class->cl_process = cl_process;
-
operation_class->opencl_support = TRUE;
- operation_class->prepare = prepare;
+ operation_class->prepare = prepare;
+
+ point_filter_class->process = process;
+ point_filter_class->cl_process = cl_process;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:exposure",
- "categories" , "color",
- "description", _("Changes Exposure and Contrast, mainly for use with high dynamic range images."),
+ "name", "gegl:exposure",
+ "categories", "color",
+ "description", _("Changes Exposure and Contrast, mainly for use with "
+ "high dynamic range images"),
NULL);
}
diff --git a/operations/common/gaussian-blur.c b/operations/common/gaussian-blur.c
index b5c0221..80d9001 100644
--- a/operations/common/gaussian-blur.c
+++ b/operations/common/gaussian-blur.c
@@ -27,18 +27,25 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double_ui (std_dev_x, _("Size X"), 0.0, 10000.0, 4.0, 0.0, 1000.0, 1.5,
- _("Standard deviation for the horizontal axis. (multiply by ~2 to get radius)"))
-gegl_chant_double_ui (std_dev_y, _("Size Y"), 0.0, 10000.0, 4.0, 0.0, 1000.0, 1.5,
- _("Standard deviation for the vertical axis. (multiply by ~2 to get radius.)"))
-gegl_chant_string (filter, _("Filter"), "auto",
- _("Optional parameter to override the automatic selection of blur filter. "
- "Choices are fir, iir, auto"))
+gegl_chant_double_ui (std_dev_x, _("Size X"),
+ 0.0, 10000.0, 4.0, 0.0, 1000.0, 1.5,
+ _("Standard deviation for the horizontal axis. "
+ "(multiply by ~2 to get radius)"))
+
+gegl_chant_double_ui (std_dev_y, _("Size Y"),
+ 0.0, 10000.0, 4.0, 0.0, 1000.0, 1.5,
+ _("Standard deviation for the vertical axis. "
+ "(multiply by ~2 to get radius.)"))
+
+gegl_chant_string (filter, _("Filter"),
+ "auto",
+ _("Optional parameter to override the automatic "
+ "selection of blur filter. Choices are fir, iir, auto"))
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "gaussian-blur.c"
+#define GEGL_CHANT_C_FILE "gaussian-blur.c"
#include "gegl-chant.h"
#include <math.h>
@@ -46,7 +53,6 @@ gegl_chant_string (filter, _("Filter"), "auto",
#define RADIUS_SCALE 4
-
static void
iir_young_find_constants (gfloat radius,
gdouble *B,
@@ -679,12 +685,11 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->opencl_support = TRUE;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:gaussian-blur",
- "categories", "blur",
- "description",
- _("Performs an averaging of neighboring pixels with the "
- "normal distribution as weighting"),
- NULL);
+ "name", "gegl:gaussian-blur",
+ "categories", "blur",
+ "description", _("Performs an averaging of neighboring pixels with the "
+ "normal distribution as weighting"),
+ NULL);
}
#endif
diff --git a/operations/common/lens-distortion.c b/operations/common/lens-distortion.c
index 56ebb4d..ee2ef47 100644
--- a/operations/common/lens-distortion.c
+++ b/operations/common/lens-distortion.c
@@ -27,26 +27,35 @@
#include "config.h"
#include <glib/gi18n-lib.h>
-
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double (main, _("Main:"), -100.0, 100.0, 0.0,
+gegl_chant_double (main, _("Main"),
+ -100.0, 100.0, 0.0,
_("Main value of distortion"))
-gegl_chant_double (zoom, _("Zoom:"), -100.0, 100.0, 0.0,
+
+gegl_chant_double (zoom, _("Zoom"),
+ -100.0, 100.0, 0.0,
_("Main value of distortion"))
-gegl_chant_double (edge, _("Edge:"), -100.0, 100.0, 0.0,
+gegl_chant_double (edge, _("Edge"),
+ -100.0, 100.0, 0.0,
_("Edge value of distortion"))
-gegl_chant_double (brighten, _("Brighten:"), -100.0, 100.0, 0.0,
+
+gegl_chant_double (brighten, _("Brighten"),
+ -100.0, 100.0, 0.0,
_("Brighten the image"))
-gegl_chant_double (x_shift, _("X shift:"), -100.0, 100.0, 0.0,
+
+gegl_chant_double (x_shift, _("X shift"),
+ -100.0, 100.0, 0.0,
_("Shift horizontal"))
-gegl_chant_double (y_shift, _("Y shift:"), -100.0, 100.0, 0.0,
+
+gegl_chant_double (y_shift, _("Y shift"),
+ -100.0, 100.0, 0.0,
_("Shift vertical"))
#else
#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE "lens-distortion.c"
+#define GEGL_CHANT_C_FILE "lens-distortion.c"
#include "gegl-chant.h"
#include <math.h>
@@ -300,13 +309,13 @@ process (GeglOperation *operation,
return TRUE;
}
-
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
- gchar *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+ gchar *composition =
+ "<?xml version='1.0' encoding='UTF-8'?>"
"<gegl>"
"<node operation='gegl:lens-distortion'>"
" <params>"
@@ -327,15 +336,16 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
- filter_class->process = process;
- operation_class->prepare = prepare;
- operation_class->get_bounding_box = get_bounding_box;
+ operation_class->prepare = prepare;
+ operation_class->get_bounding_box = get_bounding_box;
operation_class->get_required_for_output = get_required_for_output;
+ filter_class->process = process;
+
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:lens-distortion",
- "categories" , "blur",
- "description", _("Copies image performing lens distortion correction."),
+ "name", "gegl:lens-distortion",
+ "categories", "blur",
+ "description", _("Corrects lens distortion"),
"reference-composition", composition,
NULL);
}
diff --git a/operations/common/mono-mixer.c b/operations/common/mono-mixer.c
index c289e27..a1129a3 100644
--- a/operations/common/mono-mixer.c
+++ b/operations/common/mono-mixer.c
@@ -23,23 +23,28 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double_ui (red, _("Red"), -10.0, 10.0, 0.5, -1.0, 1.0, 1.0,
+gegl_chant_double_ui (red, _("Red"),
+ -10.0, 10.0, 0.5, -1.0, 1.0, 1.0,
_("Amount of red"))
-gegl_chant_double_ui (green, _("Green"), -10.0, 10.0, 0.25, -1.0, 1.0, 1.0,
+
+gegl_chant_double_ui (green, _("Green"),
+ -10.0, 10.0, 0.25, -1.0, 1.0, 1.0,
_("Amount of green"))
-gegl_chant_double_ui (blue, _("Blue"), -10.0, 10.0, 0.25, -1.0, 1.0, 1.0,
+
+gegl_chant_double_ui (blue, _("Blue"),
+ -10.0, 10.0, 0.25, -1.0, 1.0, 1.0,
_("Amount of blue"))
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "mono-mixer.c"
+#define GEGL_CHANT_C_FILE "mono-mixer.c"
#include "gegl-chant.h"
-static void prepare (GeglOperation *operation)
+static void
+prepare (GeglOperation *operation)
{
- /* set the babl format this operation prefers to work on */
gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
gegl_operation_set_format (operation, "output", babl_format ("YA float"));
}
@@ -84,14 +89,14 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- operation_class->prepare = prepare;
+ operation_class->prepare = prepare;
point_filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:mono-mixer",
- "categories" , "color",
+ "name", "gegl:mono-mixer",
+ "categories", "color",
"description", _("Monochrome channel mixer"),
- "cl-source" , mono_mixer_cl_source,
+ "cl-source", mono_mixer_cl_source,
NULL);
}
diff --git a/operations/common/noise-cielch.c b/operations/common/noise-cielch.c
index 7416211..63000d4 100644
--- a/operations/common/noise-cielch.c
+++ b/operations/common/noise-cielch.c
@@ -22,18 +22,26 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_int (holdness, _("Holdness"), 1, 8, 2, _("Holdness"))
+gegl_chant_int (holdness, _("Holdness"),
+ 1, 8, 2,
+ _("Holdness"))
-gegl_chant_double (lightness_distance, _("Lightness"), 0.0, 100.0, 40.0, _("Lightness"))
+gegl_chant_double (lightness_distance, _("Lightness"),
+ 0.0, 100.0, 40.0,
+ _("Lightness"))
-gegl_chant_double (chroma_distance, _("Chroma"), 0.0, 100.0, 40.0, _("Chroma"))
+gegl_chant_double (chroma_distance, _("Chroma"),
+ 0.0, 100.0, 40.0,
+ _("Chroma"))
-gegl_chant_double (hue_distance, _("Hue"), 0.0, 180.0, 3.0, _("Hue"))
+gegl_chant_double (hue_distance, _("Hue"),
+ 0.0, 180.0, 3.0,
+ _("Hue"))
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "noise-cielch.c"
+#define GEGL_CHANT_C_FILE "noise-cielch.c"
#include "gegl-chant.h"
#include <stdio.h>
@@ -86,8 +94,10 @@ randomize_value (gdouble now,
static void
prepare (GeglOperation *operation)
{
- gegl_operation_set_format (operation, "input" , babl_format ("CIE LCH(ab) alpha double"));
- gegl_operation_set_format (operation, "output", babl_format ("CIE LCH(ab) alpha double"));
+ gegl_operation_set_format (operation, "input" ,
+ babl_format ("CIE LCH(ab) alpha double"));
+ gegl_operation_set_format (operation, "output",
+ babl_format ("CIE LCH(ab) alpha double"));
}
static gboolean
@@ -151,14 +161,14 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- operation_class->prepare = prepare;
+ operation_class->prepare = prepare;
point_filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:noise-CIE_lch",
- "categories", "noise",
- "description", _("Randomize lightness, chroma and hue independently"),
- NULL);
+ "name", "gegl:noise-CIE_lch",
+ "categories", "noise",
+ "description", _("Randomize lightness, chroma and hue independently"),
+ NULL);
}
#endif
diff --git a/operations/common/noise-hsv.c b/operations/common/noise-hsv.c
index 2b71d20..18ea477 100644
--- a/operations/common/noise-hsv.c
+++ b/operations/common/noise-hsv.c
@@ -24,18 +24,26 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_int (holdness, _("Holdness"), 1, 8, 2, _("Holdness"))
+gegl_chant_int (holdness, _("Holdness"),
+ 1, 8, 2,
+ _("Holdness"))
-gegl_chant_double (hue_distance, _("Hue"), 0.0, 180.0, 3.0, _("Hue"))
+gegl_chant_double (hue_distance, _("Hue"),
+ 0.0, 180.0, 3.0,
+ _("Hue"))
-gegl_chant_double (saturation_distance, _("Saturation"), 0.0, 1.0, 0.04, _("Saturation"))
+gegl_chant_double (saturation_distance, _("Saturation"),
+ 0.0, 1.0, 0.04,
+ _("Saturation"))
-gegl_chant_double (value_distance, _("Value"), 0.0, 1.0, 0.04, _("Value"))
+gegl_chant_double (value_distance, _("Value"),
+ 0.0, 1.0, 0.04,
+ _("Value"))
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "noise-hsv.c"
+#define GEGL_CHANT_C_FILE "noise-hsv.c"
#include "gegl-chant.h"
#include <stdio.h>
@@ -159,9 +167,9 @@ gegl_chant_class_init (GeglChantClass *klass)
point_filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:noise-hsv",
- "categories", "noise",
- "description", _("Randomize hue, saturation and value independently"),
+ "name", "gegl:noise-hsv",
+ "categories", "noise",
+ "description", _("Randomize hue, saturation and value independently"),
NULL);
}
diff --git a/operations/common/noise-hurl.c b/operations/common/noise-hurl.c
index ff9abc2..a14f64e 100644
--- a/operations/common/noise-hurl.c
+++ b/operations/common/noise-hurl.c
@@ -28,14 +28,16 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_seed (seed, _("Seed"), _("Random seed"))
+gegl_chant_seed (seed, _("Seed"),
+ _("Random seed"))
gegl_chant_double (pct_random, _("Randomization (%)"),
- 0.0, 100.0, 50.0, _("Randomization"))
+ 0.0, 100.0, 50.0,
+ _("Randomization"))
gegl_chant_int (repeat, _("Repeat"),
- 1, 100, 1, _("Repeat"))
-
+ 1, 100, 1,
+ _("Repeat"))
#else
@@ -131,14 +133,14 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- operation_class->prepare = prepare;
+ operation_class->prepare = prepare;
point_filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:noise-hurl",
- "categories", "noise",
- "description", _("Completely randomize a fraction of pixels"),
- NULL);
+ "name", "gegl:noise-hurl",
+ "categories", "noise",
+ "description", _("Completely randomize a fraction of pixels"),
+ NULL);
}
#endif
diff --git a/operations/common/noise-pick.c b/operations/common/noise-pick.c
index 1f01e8f..47ed2e4 100644
--- a/operations/common/noise-pick.c
+++ b/operations/common/noise-pick.c
@@ -28,14 +28,16 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_seed (seed, _("Seed"), _("Random seed"))
+gegl_chant_seed (seed, _("Seed"),
+ _("Random seed"))
gegl_chant_double (pct_random, _("Randomization (%)"),
- 0.0, 100.0, 50.0, _("Randomization"))
+ 0.0, 100.0, 50.0,
+ _("Randomization"))
gegl_chant_int (repeat, _("Repeat"),
- 1, 100, 1, _("Repeat"))
-
+ 1, 100, 1,
+ _("Repeat"))
#else
@@ -203,10 +205,10 @@ gegl_chant_class_init (GeglChantClass *klass)
filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:noise-pick",
- "categories", "noise",
- "description", _("Randomly interchange some pixels with neighbors"),
- NULL);
+ "name", "gegl:noise-pick",
+ "categories", "noise",
+ "description", _("Randomly interchange some pixels with neighbors"),
+ NULL);
}
#endif
diff --git a/operations/common/noise-rgb.c b/operations/common/noise-rgb.c
index b06984d..d3ad580 100644
--- a/operations/common/noise-rgb.c
+++ b/operations/common/noise-rgb.c
@@ -25,18 +25,37 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_boolean (correlated, _("Correlated noise"), FALSE, _("Correlated noise"))
-gegl_chant_boolean (independent, _("Independent RGB"), TRUE, _("Independent RGB"))
-gegl_chant_double (red, _("Red"), 0.0, 1.0, 0.20, _("Red"))
-gegl_chant_double (green, _("Green"), 0.0, 1.0, 0.20, _("Green"))
-gegl_chant_double (blue, _("Blue"), 0.0, 1.0, 0.20, _("Blue"))
-gegl_chant_double (alpha, _("Alpha"), 0.0, 1.0, 0.00, _("Alpha"))
-gegl_chant_seed (seed, _("Seed"), _("Random seed"))
+gegl_chant_boolean (correlated, _("Correlated noise"),
+ FALSE,
+ _("Correlated noise"))
+
+gegl_chant_boolean (independent, _("Independent RGB"),
+ TRUE,
+ _("Independent RGB"))
+
+gegl_chant_double (red, _("Red"),
+ 0.0, 1.0, 0.20,
+ _("Red"))
+
+gegl_chant_double (green, _("Green"),
+ 0.0, 1.0, 0.20,
+ _("Green"))
+
+gegl_chant_double (blue, _("Blue"),
+ 0.0, 1.0, 0.20,
+ _("Blue"))
+
+gegl_chant_double (alpha, _("Alpha"),
+ 0.0, 1.0, 0.00,
+ _("Alpha"))
+
+gegl_chant_seed (seed, _("Seed"),
+ _("Random seed"))
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "noise-rgb.c"
+#define GEGL_CHANT_C_FILE "noise-rgb.c"
#include "gegl-chant.h"
#include <stdio.h>
@@ -158,14 +177,14 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- operation_class->prepare = prepare;
+ operation_class->prepare = prepare;
point_filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:noise-rgb",
- "categories", "noise",
- "description", _("Distort colors by random amounts."),
- NULL);
+ "name", "gegl:noise-rgb",
+ "categories", "noise",
+ "description", _("Distort colors by random amounts."),
+ NULL);
}
#endif
diff --git a/operations/common/noise-slur.c b/operations/common/noise-slur.c
index d19ca71..576265a 100644
--- a/operations/common/noise-slur.c
+++ b/operations/common/noise-slur.c
@@ -31,14 +31,16 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_seed (seed, _("Seed"), _("Random seed"))
+gegl_chant_seed (seed, _("Seed"),
+ _("Random seed"))
gegl_chant_double (pct_random, _("Randomization (%)"),
- 0.0, 100.0, 50.0, _("Randomization"))
+ 0.0, 100.0, 50.0,
+ _("Randomization"))
gegl_chant_int (repeat, _("Repeat"),
- 1, 100, 1, _("Repeat"))
-
+ 1, 100, 1,
+ _("Repeat"))
#else
@@ -185,13 +187,13 @@ gegl_chant_class_init (GeglChantClass *klass)
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
operation_class->prepare = prepare;
- filter_class->process = process;
+ filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:noise-slur",
- "categories", "noise",
- "description", _("Randomly slide some pixels downward (similar to melting)"),
- NULL);
+ "name", "gegl:noise-slur",
+ "categories", "noise",
+ "description", _("Randomly slide some pixels downward (similar to melting)"),
+ NULL);
}
#endif
diff --git a/operations/common/photocopy.c b/operations/common/photocopy.c
index 6c9ede9..35dbf75 100644
--- a/operations/common/photocopy.c
+++ b/operations/common/photocopy.c
@@ -22,22 +22,26 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double (mask_radius, _("Mask Radius"), 0.0, 50.0, 10.0,
+gegl_chant_double (mask_radius, _("Mask Radius"),
+ 0.0, 50.0, 10.0,
_("Mask Radius"))
-gegl_chant_double (sharpness, _("Sharpness"), 0.0, 1.0, 0.5,
+gegl_chant_double (sharpness, _("Sharpness"),
+ 0.0, 1.0, 0.5,
_("Sharpness"))
-gegl_chant_double (black, _("Percent Black"), 0.0, 1.0, 0.2,
+gegl_chant_double (black, _("Percent Black"),
+ 0.0, 1.0, 0.2,
_("Percent Black"))
-gegl_chant_double (white, _("Percent White"), 0.0, 1.0, 0.2,
+gegl_chant_double (white, _("Percent White"),
+ 0.0, 1.0, 0.2,
_("Percent White"))
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "photocopy.c"
+#define GEGL_CHANT_C_FILE "photocopy.c"
#include "gegl-chant.h"
#include <math.h>
@@ -390,9 +394,9 @@ gegl_chant_class_init (GeglChantClass *klass)
filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "categories" , "artistic",
- "name" , "gegl:photocopy",
- "description", _("Photocopy effect"),
- NULL);
+ "name", "gegl:photocopy",
+ "categories", "artistic",
+ "description", _("Simulate color distortion produced by a copy machine"),
+ NULL);
}
#endif
diff --git a/operations/common/pixelize.c b/operations/common/pixelize.c
index f5a9fd1..e3a27e2 100644
--- a/operations/common/pixelize.c
+++ b/operations/common/pixelize.c
@@ -22,15 +22,18 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_int_ui (size_x, _("Block Width"), 1, 123456, 16, 1, 2048, 1.5,
- _("Width of blocks in pixels"))
-gegl_chant_int_ui (size_y, _("Block Height"), 1, 123456, 16, 1, 2048, 1.5,
- _("Height of blocks in pixels"))
+gegl_chant_int_ui (size_x, _("Block Width"),
+ 1, 123456, 16, 1, 2048, 1.5,
+ _("Width of blocks in pixels"))
+
+gegl_chant_int_ui (size_y, _("Block Height"),
+ 1, 123456, 16, 1, 2048, 1.5,
+ _("Height of blocks in pixels"))
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "pixelize.c"
+#define GEGL_CHANT_C_FILE"pixelize.c"
#include "gegl-chant.h"
@@ -38,7 +41,8 @@ gegl_chant_int_ui (size_y, _("Block Height"), 1, 123456, 16, 1, 2048, 1.5,
#define CELL_Y(py, cell_height) ((py) / (cell_height))
-static void prepare (GeglOperation *operation)
+static void
+prepare (GeglOperation *operation)
{
GeglChantO *o;
GeglOperationAreaFilter *op_area;
@@ -303,16 +307,15 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
- filter_class->process = process;
- operation_class->prepare = prepare;
-
+ operation_class->prepare = prepare;
operation_class->opencl_support = TRUE;
+ filter_class->process = process;
+
gegl_operation_class_set_keys (operation_class,
- "categories" , "blur",
- "name" , "gegl:pixelize",
- "description",
- _("Simplify image into an array of solid-colored squares"),
+ "name", "gegl:pixelize",
+ "categories", "blur",
+ "description", _("Simplify image into an array of solid-colored rectangles"),
NULL);
}
diff --git a/operations/common/polar-coordinates.c b/operations/common/polar-coordinates.c
index 2102294..366cf36 100644
--- a/operations/common/polar-coordinates.c
+++ b/operations/common/polar-coordinates.c
@@ -31,25 +31,43 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double (depth, _("Circle depth in percent"), 0.0, 100.0, 100.0,
- _("Circle depth in percent"))
-gegl_chant_double (angle, _("Offset angle"), 0.0, 359.9, 0.0,
- _("Offset angle."))
-gegl_chant_boolean (bw, _("Map backwards"), FALSE, _("Start from the right instead of the left"))
-gegl_chant_boolean (top, _("Map from top"), TRUE, _("Put the top row in the middle and the bottom row on the
outside"))
-gegl_chant_boolean (polar, _("To polar"), TRUE, _("Map the image to a circle"))
-gegl_chant_int (pole_x, _("X:"), 0, G_MAXINT, 0,
- _("Origin point for the polar coordinates"))
-gegl_chant_int (pole_y, _("Y:"), 0, G_MAXINT, 0,
- _("Origin point for the polar coordinates"))
-gegl_chant_boolean (middle, _("Choose middle"), TRUE,
- _("Let origin point to be the middle one"))
+gegl_chant_double (depth, _("Circle depth in percent"),
+ 0.0, 100.0, 100.0,
+ _("Circle depth in percent"))
+
+gegl_chant_double (angle, _("Offset angle"),
+ 0.0, 359.9, 0.0,
+ _("Offset angle."))
+
+gegl_chant_boolean (bw, _("Map backwards"),
+ FALSE,
+ _("Start from the right instead of the left"))
+
+gegl_chant_boolean (top, _("Map from top"),
+ TRUE,
+ _("Put the top row in the middle and the bottom row on "
+ "the outside"))
+
+gegl_chant_boolean (polar, _("To polar"),
+ TRUE,
+ _("Map the image to a circle"))
+gegl_chant_int (pole_x, _("X"),
+ 0, G_MAXINT, 0,
+ _("Origin point for the polar coordinates"))
+
+gegl_chant_int (pole_y, _("Y"),
+ 0, G_MAXINT, 0,
+ _("Origin point for the polar coordinates"))
+
+gegl_chant_boolean (middle, _("Choose middle"),
+ TRUE,
+ _("Let origin point to be the middle one"))
#else
#define GEGL_CHANT_TYPE_FILTER
-#define GEGL_CHANT_C_FILE "polar-coordinates.c"
+#define GEGL_CHANT_C_FILE "polar-coordinates.c"
#include "gegl-chant.h"
#include <stdio.h>
@@ -61,7 +79,8 @@ gegl_chant_boolean (middle, _("Choose middle"), TRUE,
#define SCALE_WIDTH 200
#define ENTRY_WIDTH 60
-static void prepare (GeglOperation *operation)
+static void
+prepare (GeglOperation *operation)
{
gegl_operation_set_format (operation, "input",
babl_format ("RGBA float"));
@@ -391,15 +410,16 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
- filter_class->process = process;
- operation_class->prepare = prepare;
+ operation_class->prepare = prepare;
operation_class->get_bounding_box = get_bounding_box;
operation_class->get_required_for_output = get_required_for_output;
+ filter_class->process = process;
+
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:polar-coordinates",
- "categories" , "enhance",
- "description", _("Performs polar-coordinates on the image."),
+ "name", "gegl:polar-coordinates",
+ "categories", "enhance",
+ "description", _("Convert image to or from polar coordinates"),
NULL);
}
diff --git a/operations/common/red-eye-removal.c b/operations/common/red-eye-removal.c
index 81aac57..7e10542 100644
--- a/operations/common/red-eye-removal.c
+++ b/operations/common/red-eye-removal.c
@@ -122,13 +122,13 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
- filter_class->process = process;
operation_class->prepare = prepare;
+ filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "categories" , "enhance",
- "name" , "gegl:red-eye-removal",
- "description" , _("Remove the red eye effect caused by camera flashes"),
+ "name", "gegl:red-eye-removal",
+ "categories", "enhance",
+ "description", _("Remove the red eye effect caused by camera flashes"),
NULL);
}
diff --git a/operations/common/ripple.c b/operations/common/ripple.c
index 0279395..697ee54 100644
--- a/operations/common/ripple.c
+++ b/operations/common/ripple.c
@@ -24,43 +24,52 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double_ui (amplitude, _("Amplitude"), 0.0, 1000.0, 25.0, 0.0, 1000.0, 2.0,
- _("Amplitude of the ripple"))
+gegl_chant_register_enum (gegl_ripple_wave_type)
+ enum_value (GEGl_RIPPLE_WAVE_TYPE_SINE, "Sine")
+ enum_value (GEGl_RIPPLE_WAVE_TYPE_SAWTOOTH, "Sawtooth")
+gegl_chant_register_enum_end (GeglRippleWaveType)
-gegl_chant_double_ui (period, _("Period"), 0.0, 1000.0, 200.0, 0.0, 1000.0, 1.5,
- _("Period of the ripple"))
+gegl_chant_double_ui (amplitude, _("Amplitude"),
+ 0.0, 1000.0, 25.0, 0.0, 1000.0, 2.0,
+ _("Amplitude of the ripple"))
-gegl_chant_double (phi, _("Phase shift"), -1.0, 1.0, 0.0,
- _("Phase shift"))
+gegl_chant_double_ui (period, _("Period"),
+ 0.0, 1000.0, 200.0, 0.0, 1000.0, 1.5,
+ _("Period of the ripple"))
-gegl_chant_double (angle, _("Angle"), -180.0, 180.0, 0.0,
- _("Angle in degree"))
+gegl_chant_double (phi, _("Phase shift"),
+ -1.0, 1.0, 0.0,
+ _("Phase shift"))
-gegl_chant_enum (sampler_type, _("Sampler"), GeglSamplerType, gegl_sampler_type,
- GEGL_SAMPLER_CUBIC, _("Sampler used internally"))
+gegl_chant_double (angle, _("Angle"),
+ -180.0, 180.0, 0.0,
+ _("Angle in degree"))
-gegl_chant_register_enum (gegl_ripple_wave_type)
- enum_value (GEGl_RIPPLE_WAVE_TYPE_SINE, "Sine")
- enum_value (GEGl_RIPPLE_WAVE_TYPE_SAWTOOTH, "Sawtooth")
-gegl_chant_register_enum_end (GeglRippleWaveType)
+gegl_chant_enum (sampler_type, _("Sampler"),
+ GeglSamplerType, gegl_sampler_type, GEGL_SAMPLER_CUBIC,
+ _("Sampler used internally"))
-gegl_chant_enum (wave_type, _("Wave type"), GeglRippleWaveType, gegl_ripple_wave_type,
- GEGl_RIPPLE_WAVE_TYPE_SINE, _("Type of wave"))
+gegl_chant_enum (wave_type, _("Wave type"),
+ GeglRippleWaveType, gegl_ripple_wave_type,
+ GEGl_RIPPLE_WAVE_TYPE_SINE,
+ _("Type of wave"))
-gegl_chant_boolean (tileable, _("Tileable"), FALSE,
- _("Retain tilebility"))
+gegl_chant_boolean (tileable, _("Tileable"),
+ FALSE,
+ _("Retain tilebility"))
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "ripple.c"
+#define GEGL_CHANT_C_FILE "ripple.c"
#include "gegl-chant.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
-static void prepare (GeglOperation *operation)
+static void
+prepare (GeglOperation *operation)
{
GeglChantO *o;
GeglOperationAreaFilter *op_area;
@@ -166,13 +175,13 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
- filter_class->process = process;
operation_class->prepare = prepare;
+ filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "categories" , "distort",
- "name" , "gegl:ripple",
- "description", _("Transform the buffer with a ripple pattern"),
+ "name", "gegl:ripple",
+ "categories", "distort",
+ "description", _("Displace pixels in a ripple pattern"),
NULL);
}
diff --git a/operations/common/softglow.c b/operations/common/softglow.c
index 1aac225..e8b0e95 100644
--- a/operations/common/softglow.c
+++ b/operations/common/softglow.c
@@ -23,16 +23,22 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double (glow_radius, _("Glow radius"), 1.0, 50.0, 10.0, _("Glow radius"))
+gegl_chant_double (glow_radius, _("Glow radius"),
+ 1.0, 50.0, 10.0,
+ _("Glow radius"))
-gegl_chant_double (brightness, _("Brightness"), 0.0, 1.0, 0.75, _("Brightness"))
+gegl_chant_double (brightness, _("Brightness"),
+ 0.0, 1.0, 0.75,
+ _("Brightness"))
-gegl_chant_double (sharpness, _("Sharpness"), 0.0, 1.0, 0.85, _("Sharpness"))
+gegl_chant_double (sharpness, _("Sharpness"),
+ 0.0, 1.0, 0.85,
+ _("Sharpness"))
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
-#define GEGL_CHANT_C_FILE "softglow.c"
+#define GEGL_CHANT_C_FILE "softglow.c"
#include "gegl-chant.h"
#include <stdio.h>
@@ -239,10 +245,10 @@ gegl_chant_class_init (GeglChantClass *klass)
filter_class->process = process;
gegl_operation_class_set_keys (operation_class,
- "categories" , "artistic",
- "name" , "gegl:softglow",
- "description", _("Softglow effect"),
- NULL);
+ "name", "gegl:softglow",
+ "categories", "artistic",
+ "description", _("Simulate glow by making highlights intense and fuzzy"),
+ NULL);
}
#endif
diff --git a/operations/common/unsharp-mask.c b/operations/common/unsharp-mask.c
index 1d5acd8..c0a8475 100644
--- a/operations/common/unsharp-mask.c
+++ b/operations/common/unsharp-mask.c
@@ -21,19 +21,23 @@
#ifdef GEGL_CHANT_PROPERTIES
-gegl_chant_double_ui (std_dev, _("Std. Dev."), 0.0, 500.0, 1.0, 0.0, 200.0, 1.5,
- _("Standard deviation (spatial scale factor)"))
-gegl_chant_double_ui (scale, _("Scale"), 0.0, 100.0, 1.0, 0.0, 100.0, 1.5,
- _("Scale, strength of effect"))
+gegl_chant_double_ui (std_dev, _("Std. Dev."),
+ 0.0, 500.0, 1.0, 0.0, 200.0, 1.5,
+ _("Standard deviation (spatial scale factor)"))
+
+gegl_chant_double_ui (scale, _("Scale"),
+ 0.0, 100.0, 1.0, 0.0, 100.0, 1.5,
+ _("Scale, strength of effect"))
#else
#define GEGL_CHANT_TYPE_META
-#define GEGL_CHANT_C_FILE "unsharp-mask.c"
+#define GEGL_CHANT_C_FILE "unsharp-mask.c"
#include "gegl-chant.h"
-static void attach (GeglOperation *operation)
+static void
+attach (GeglOperation *operation)
{
GeglNode *gegl, *input, *output, *add, *multiply, *subtract, *blur;
@@ -64,15 +68,15 @@ gegl_chant_class_init (GeglChantClass *klass)
GeglOperationClass *operation_class;
operation_class = GEGL_OPERATION_CLASS (klass);
+
operation_class->attach = attach;
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:unsharp-mask",
- "categories" , "meta:enhance",
- "description",
- _("Performs an unsharp mask on the input buffer (sharpens an image by "
- "adding false mach-bands around edges)"),
- NULL);
+ "name", "gegl:unsharp-mask",
+ "categories", "meta:enhance",
+ "description", _("The most widely used method for sharpening an image, "
+ "sharpens by adding false mach-bands around edges"),
+ NULL);
}
#endif
diff --git a/operations/common/vignette.c b/operations/common/vignette.c
index c56c08f..14dac7e 100644
--- a/operations/common/vignette.c
+++ b/operations/common/vignette.c
@@ -19,33 +19,64 @@
#include "config.h"
#include <glib/gi18n-lib.h>
-
#ifdef GEGL_CHANT_PROPERTIES
+
gegl_chant_register_enum (gegl_vignette_shape)
enum_value (GEGl_VIGNETTE_SHAPE_CIRCLE, "Circle")
enum_value (GEGl_VIGNETTE_SHAPE_SQUARE, "Square")
enum_value (GEGl_VIGNETTE_SHAPE_DIAMOND, "Diamond")
gegl_chant_register_enum_end (GeglVignetteShape)
-gegl_chant_enum (shape, _("Shape"), GeglVignetteShape, gegl_vignette_shape,
- GEGl_VIGNETTE_SHAPE_CIRCLE, _("Shape of the vignette"))
+gegl_chant_enum (shape, _("Shape"),
+ GeglVignetteShape, gegl_vignette_shape,
+ GEGl_VIGNETTE_SHAPE_CIRCLE,
+ _("Shape of the vignette"))
+
+gegl_chant_color (color, _("Color"),
+ "black",
+ _("Defaults to 'black', you can use transparency here "
+ "to erase portions of an image"))
+
+gegl_chant_double (radius, _("Radius"),
+ 0.0, 3.0, 1.5,
+ _("How far out vignetting goes as portion of half "
+ "image diagonal"))
+
+gegl_chant_double (softness, _("Softness"),
+ 0.0, 1.0, 0.8,
+ _("Softness"))
+
+gegl_chant_double (gamma, _("Gamma"),
+ 1.0, 20.0, 2.0,
+ _("Falloff linearity"))
+
+gegl_chant_double (proportion, _("Proportion"),
+ 0.0, 1.0, 1.0,
+ _("How close we are to image proportions"))
+gegl_chant_double (squeeze, _("Squeeze"),
+ -1.0, 1.0, 0.0,
+ _("Aspect ratio to use, -0.5 = 1:2, 0.0 = 1:1, 0.5 = 2:1, "
+ "-1.0 = 1:inf 1.0 = inf:1, this is applied after "
+ "proportion is taken into account, to directly use "
+ "squeeze factor as proportions, set proportion to 0.0."))
-gegl_chant_color (color, _("Color"), "black", _("Defaults to 'black', you can use transparency here to
erase portions of an image"))
-gegl_chant_double (radius, _("Radius"), 0.0, 3.0, 1.5, _("How far out vignetting goes as portion of half
image diagonal"))
-gegl_chant_double (softness, _("Softness"), 0.0, 1.0, 0.8, _("Softness"))
-gegl_chant_double (gamma, _("Gamma"), 1.0, 20.0, 2.0, _("Falloff linearity"))
-gegl_chant_double (proportion, _("Proportion"), 0.0, 1.0, 1.0, _("How close we are to image proportions"))
-gegl_chant_double (squeeze, _("Squeeze"), -1.0, 1.0, 0.0, _("Aspect ratio to use, -0.5 = 1:2, 0.0 = 1:1,
0.5 = 2:1, -1.0 = 1:inf 1.0 = inf:1, this is applied after proportion is taken into account, to directly use
squeeze factor as proportions, set proportion to 0.0."))
+gegl_chant_double (x, _("X"),
+ -1.0, 2.0, 0.5,
+ _("Horizontal center of vignetting"))
-gegl_chant_double (x, _("X"), -1.0, 2.0, 0.5, _("Horizontal center of vignetting"))
-gegl_chant_double (y, _("Y"), -1.0, 2.0, 0.5, _("Vertical center of vignetting"))
-gegl_chant_double (rotation, _("Rotation"), 0.0, 360.0, 0.0, _("Rotation angle"))
+gegl_chant_double (y, _("Y"),
+ -1.0, 2.0, 0.5,
+ _("Vertical center of vignetting"))
+
+gegl_chant_double (rotation, _("Rotation"),
+ 0.0, 360.0, 0.0,
+ _("Rotation angle"))
#else
#define GEGL_CHANT_TYPE_POINT_FILTER
-#define GEGL_CHANT_C_FILE "vignette.c"
+#define GEGL_CHANT_C_FILE "vignette.c"
#include "gegl-chant.h"
@@ -67,7 +98,8 @@ prepare (GeglOperation *operation)
* 1.0 = infinity
*/
-static float aspect_to_scale (float aspect)
+static float
+aspect_to_scale (float aspect)
{
if (aspect == 0.0)
return 1.0;
@@ -78,7 +110,8 @@ static float aspect_to_scale (float aspect)
}
#if 0
-static float scale_to_aspect (float scale)
+static float
+scale_to_aspect (float scale)
{
if (scale == 1.0)
return 0.0;
@@ -327,27 +360,30 @@ process (GeglOperation *operation,
return TRUE;
}
+
static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *point_filter_class;
- operation_class = GEGL_OPERATION_CLASS (klass);
+ operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
- point_filter_class->process = process;
- point_filter_class->cl_process = cl_process;
-
- operation_class->prepare = prepare;
- operation_class->no_cache = TRUE;
-
+ operation_class->prepare = prepare;
+ operation_class->no_cache = TRUE;
operation_class->opencl_support = TRUE;
+ point_filter_class->process = process;
+ point_filter_class->cl_process = cl_process;
+
gegl_operation_class_set_keys (operation_class,
- "name" , "gegl:vignette",
- "categories" , "render",
- "description", _("A vignetting op, applies a vignette to an image. Simulates the luminance fall off at
edge of exposed film, and some other fuzzier border effects that can naturally occur with analoge
photograpy."),
+ "name", "gegl:vignette",
+ "categories", "render",
+ "description", _("Applies a vignette to an image. Simulates the luminance "
+ "fall off at the edge of exposed film, and some other "
+ "fuzzier border effects that can naturally occur with "
+ "analog photograpy"),
NULL);
}
diff --git a/operations/common/whirl-pinch.c b/operations/common/whirl-pinch.c
index e508992..afa9e43 100644
--- a/operations/common/whirl-pinch.c
+++ b/operations/common/whirl-pinch.c
@@ -269,10 +269,10 @@ gegl_chant_class_init (GeglChantClass *klass)
operation_class->get_required_for_output = get_required_for_output;
gegl_operation_class_set_keys (operation_class,
- "name", "gegl:whirl-pinch",
- "categories", "distort",
- "description", _("Distort an image by whirling and pinching"),
- NULL);
+ "name", "gegl:whirl-pinch",
+ "categories", "distort",
+ "description", _("Distort an image by whirling and pinching"),
+ NULL);
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]