[gegl/soc-2012-ville: 20/24] operations: added reference compositions to lens-distortion, levels, map-relative, crop, vector-fill
- From: Ville Sokk <villesokk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2012-ville: 20/24] operations: added reference compositions to lens-distortion, levels, map-relative, crop, vector-fill
- Date: Thu, 2 Aug 2012 18:29:29 +0000 (UTC)
commit de104294ac0d08bb8fa0d3c4081c2a6a9ad2aa10
Author: Ville Sokk <ville sokk gmail com>
Date: Sat Jul 21 19:55:17 2012 +0300
operations: added reference compositions to lens-distortion, levels, map-relative, crop, vector-fill
operations/common/lens-distortion.c | 18 ++++++++++++++++++
operations/common/levels.c | 17 +++++++++++++++++
operations/common/map-relative.c | 17 +++++++++++++++++
operations/core/crop.c | 17 +++++++++++++++++
operations/external/vector-fill.c | 11 +++++++++++
5 files changed, 80 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/lens-distortion.c b/operations/common/lens-distortion.c
index 27e8e66..56ebb4d 100644
--- a/operations/common/lens-distortion.c
+++ b/operations/common/lens-distortion.c
@@ -306,6 +306,23 @@ gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
+ gchar *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ "<node operation='gegl:lens-distortion'>"
+ " <params>"
+ " <param name='main'>100</param>"
+ " <param name='zoom'>20</param>"
+ " <param name='edge'>100</param>"
+ " <param name='x-shift'>20</param>"
+ " <param name='y-shift'>20</param>"
+ " </params>"
+ "</node>"
+ "<node operation='gegl:load'>"
+ " <params>"
+ " <param name='path'>standard-input.png</param>"
+ " </params>"
+ "</node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
@@ -319,6 +336,7 @@ gegl_chant_class_init (GeglChantClass *klass)
"name" , "gegl:lens-distortion",
"categories" , "blur",
"description", _("Copies image performing lens distortion correction."),
+ "reference-composition", composition,
NULL);
}
diff --git a/operations/common/levels.c b/operations/common/levels.c
index 18f4596..2c3f9f0 100644
--- a/operations/common/levels.c
+++ b/operations/common/levels.c
@@ -167,6 +167,22 @@ gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationPointFilterClass *point_filter_class;
+ gchar *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ "<node operation='gegl:levels'>"
+ " <params>"
+ " <param name='in-low'>0.54</param>"
+ " <param name='in-high'>0.60</param>"
+ " <param name='out-low'>0.57</param>"
+ " <param name='out-high'>0.68</param>"
+ " </params>"
+ "</node>"
+ "<node operation='gegl:load'>"
+ " <params>"
+ " <param name='path'>standard-input.png</param>"
+ " </params>"
+ "</node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
point_filter_class = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
@@ -180,6 +196,7 @@ gegl_chant_class_init (GeglChantClass *klass)
"name" , "gegl:levels",
"categories" , "color",
"description", _("Remaps the intensity range of the image"),
+ "reference-composition", composition,
NULL);
}
diff --git a/operations/common/map-relative.c b/operations/common/map-relative.c
index 72b6cf0..415becb 100644
--- a/operations/common/map-relative.c
+++ b/operations/common/map-relative.c
@@ -143,6 +143,22 @@ gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationComposerClass *composer_class;
+ gchar *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ "<node operation='gegl:map-relative'>"
+ " <params>"
+ " <param name='scaling'>100</param>"
+ " </params>"
+ " <node operation='gegl:load'>"
+ " <params><param name='path'>standard-aux.png</param></params>"
+ " </node>"
+ "</node>"
+ "<node operation='gegl:load'>"
+ " <params>"
+ " <param name='path'>standard-input.png</param>"
+ " </params>"
+ "</node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
composer_class = GEGL_OPERATION_COMPOSER_CLASS (klass);
@@ -155,6 +171,7 @@ gegl_chant_class_init (GeglChantClass *klass)
"name" , "gegl:map-relative",
"categories" , "transform",
"description", _("sample input with an auxiliary buffer that contain relative source coordinates"),
+ "reference-composition", composition,
NULL);
}
#endif
diff --git a/operations/core/crop.c b/operations/core/crop.c
index 35b5992..62d0b6f 100644
--- a/operations/core/crop.c
+++ b/operations/core/crop.c
@@ -164,6 +164,22 @@ static void
gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
+ gchar *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ "<node operation='gegl:crop'>"
+ " <params>"
+ " <param name='x'>50</param>"
+ " <param name='y'>80</param>"
+ " <param name='width'>70</param>"
+ " <param name='height'>60</param>"
+ " </params>"
+ "</node>"
+ "<node operation='gegl:load'>"
+ " <params>"
+ " <param name='path'>standard-input.png</param>"
+ " </params>"
+ "</node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
@@ -177,6 +193,7 @@ gegl_chant_class_init (GeglChantClass *klass)
"name", "gegl:crop",
"categories", "core",
"description", _("Crop a buffer"),
+ "reference-composition", composition,
NULL);
operation_class->no_cache = TRUE;
diff --git a/operations/external/vector-fill.c b/operations/external/vector-fill.c
index 57ffeab..bd238fc 100644
--- a/operations/external/vector-fill.c
+++ b/operations/external/vector-fill.c
@@ -243,6 +243,16 @@ gegl_chant_class_init (GeglChantClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationFilterClass *filter_class;
+ gchar *composition = "<?xml version='1.0' encoding='UTF-8'?>"
+ "<gegl>"
+ "<node operation='gegl:fill-path'>"
+ " <params>"
+ " <param name='d'>M30,4 C12,13 0,30 0,50 C0,78 23,100 50,100 C71,100 88,88 96,71"
+ " L56,71 C42,71 30,59 30,45 L30,4 z</param>"
+ " <param name='color'>rgb(0.0, 0.6, 1.0)</param>"
+ " </params>"
+ "</node>"
+ "</gegl>";
operation_class = GEGL_OPERATION_CLASS (klass);
filter_class = GEGL_OPERATION_FILTER_CLASS (klass);
@@ -256,6 +266,7 @@ gegl_chant_class_init (GeglChantClass *klass)
"name" , "gegl:fill-path",
"categories" , "render",
"description", _("Renders a filled region"),
+ "reference-composition", composition,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]