Commit a6b5d17d authored by Ville Sokk's avatar Ville Sokk Committed by Øyvind "pippin" Kolås

operations: added reference compositions to lens-distortion, levels,...

operations: added reference compositions to lens-distortion, levels, map-relative, crop, vector-fill
parent 8aa3b1d4
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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
......@@ -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;
......
......@@ -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);
}
......
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