[gegl/next-API: 1/7] transform-core: remove unused hard_edges and lanczos_width properties
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/next-API: 1/7] transform-core: remove unused hard_edges and lanczos_width properties
- Date: Mon, 18 Jun 2012 12:09:19 +0000 (UTC)
commit 00ce51e241e9d0f9179326cbcbd33fc40a31f903
Author: Michael Murà <mure michael gmail com>
Date: Sun May 27 13:37:07 2012 +0900
transform-core: remove unused hard_edges and lanczos_width properties
bin/gegl.c | 2 +-
docs/gallery/clones.xml | 5 ----
operations/transform/transform-core.c | 29 ----------------------------
operations/transform/transform-core.h | 2 -
tests/compositions/clones.xml | 5 ----
tests/compositions/composite-transform.xml | 2 -
tests/compositions/transform.xml | 2 -
tests/xml/data/rgb-params.xml | 2 -
8 files changed, 1 insertions(+), 48 deletions(-)
---
diff --git a/bin/gegl.c b/bin/gegl.c
index 6db3884..cc6a3e3 100644
--- a/bin/gegl.c
+++ b/bin/gegl.c
@@ -42,7 +42,7 @@
#endif
#define DEFAULT_COMPOSITION \
-"<?xml version='1.0' encoding='UTF-8'?> <gegl> <node operation='gegl:crop'> <params> <param name='x'>0</param> <param name='y'>0</param> <param name='width'>395</param> <param name='height'>200</param> </params> </node> <node operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>80</param> <param name='y'>162</param> </params> </node> <node operation='gegl:opacity'> <params> <param name='value'>0.5</param> </params> </node> <node name='text' operation='gegl:text'> <params> <param name='string'>2000-2011 Â Various contributors</param> <param name='font'>Sans</param> <param name='size'>12</param> <param name='color'>rgb(0.0000, 0.0000, 0.0000)</param> <param name='wrap'>628</param> <param name='alignment'>0</param> <param name='width'>622</param> <param name='height'>40</param> </params> </node> </node> <node operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>20</param> <param name='y'>50</param> </params> </node> <no
de operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>0</param> <param name='y'>0</param> </params> </node> <node operation='gegl:dropshadow'> <params> <param name='opacity'>1.2</param> <param name='x'>0</param> <param name='y'>0</param> <param name='radius'>8</param> </params> </node> <gegl:fill-path d='M0,50 C0,78 24,100 50,100 C77,100 100,78 100,50 C100,45 99,40 98,35 C82,35 66,35 50,35 C42,35 35,42 35,50 C35,58 42,65 50,65 C56,65 61,61 64,56 C67,51 75,55 73,60 C69,69 60,75 50,75 C36,75 25,64 25,50 C25,36 36,25 50,25 L93,25 C83,9 67,0 49,0 C25,0 0,20 0,50 z' color='white'/> </node> <node operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>88</param> <param name='y'>0</param> </params> </node> <node operation='gegl:dropshadow'> <params> <param name='opacity'>1.2</param> <param name='x'>0</param> <param name='y'>0</param> <param name='radius'>8</param> </params> </node> <node operation='gegl:fill-path'> <params> <
param name='d'>M50,0 C23,0 0,22 0,50 C0,77 22,100 50,100 C68,100 85,90 93,75 L40,75 C35,75 35,65 40,65 L98,65 C100,55 100,45 98,35 L40,35 C35,35 35,25 40,25 L93,25 C84,10 68,0 50,0 z</param> <param name='color'>rgb(1.0000, 1.0000, 1.0000)</param> </params> </node> </node> <node operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>176</param> <param name='y'>0</param> </params> </node> <node operation='gegl:dropshadow'> <params> <param name='opacity'>1.2</param> <param name='x'>0</param> <param name='y'>0</param> <param name='radius'>8</param> </params> </node> <node operation='gegl:fill-path'> <params> <param name='d'>M0,50 C0,78 24,100 50,100 C77,100 100,78 100,50 C100,45 99,40 98,35 C82,35 66,35 50,35 C42,35 35,42 35,50 C35,58 42,65 50,65 C56,65 61,61 64,56 C67,51 75,55 73,60 C69,69 60,75 50,75 C36,75 25,64 25,50 C25,36 36,25 50,25 L93,25 C83,9 67,0 49,0 C25,0 0,20 0,50 z</param> <param name='color'>rgb(1.0000, 1.0000, 1.0000)</param> </params>
</node> </node> <node operation='gegl:translate'> <params> <param name='x'>264</param> <param name='y'>0</param> </params> </node> <node operation='gegl:dropshadow'> <params> <param name='opacity'>1.2</param> <param name='x'>0</param> <param name='y'>0</param> <param name='radius'>8</param> </params> </node> <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(1.0000, 1.0000, 1.0000)</param> </params> </node> </node> <node operation='gegl:rotate'> <params> <param name='origin-x'>0</param> <param name='origin-y'>0</param> <param name='filter'>linear</param> <param name='hard-edges'>false</param> <param name='lanczos-width'>3</param> <param name='degrees'>42</param> </params> </node> <node operation='gegl:checkerboard'> <params> <param name='x'>43</param> <param name='y'>44</param> <param name='x-offset'>0</param> <param name='y-offset'>0</par
am> <param name='color1'>rgb(0.7097, 0.7097, 0.7097)</param> <param name='color2'>rgb(0.7661, 0.7661, 0.7661)</param> </params> </node> </gegl>"
+"<?xml version='1.0' encoding='UTF-8'?> <gegl> <node operation='gegl:crop'> <params> <param name='x'>0</param> <param name='y'>0</param> <param name='width'>395</param> <param name='height'>200</param> </params> </node> <node operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>80</param> <param name='y'>162</param> </params> </node> <node operation='gegl:opacity'> <params> <param name='value'>0.5</param> </params> </node> <node name='text' operation='gegl:text'> <params> <param name='string'>2000-2011 Â Various contributors</param> <param name='font'>Sans</param> <param name='size'>12</param> <param name='color'>rgb(0.0000, 0.0000, 0.0000)</param> <param name='wrap'>628</param> <param name='alignment'>0</param> <param name='width'>622</param> <param name='height'>40</param> </params> </node> </node> <node operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>20</param> <param name='y'>50</param> </params> </node> <no
de operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>0</param> <param name='y'>0</param> </params> </node> <node operation='gegl:dropshadow'> <params> <param name='opacity'>1.2</param> <param name='x'>0</param> <param name='y'>0</param> <param name='radius'>8</param> </params> </node> <gegl:fill-path d='M0,50 C0,78 24,100 50,100 C77,100 100,78 100,50 C100,45 99,40 98,35 C82,35 66,35 50,35 C42,35 35,42 35,50 C35,58 42,65 50,65 C56,65 61,61 64,56 C67,51 75,55 73,60 C69,69 60,75 50,75 C36,75 25,64 25,50 C25,36 36,25 50,25 L93,25 C83,9 67,0 49,0 C25,0 0,20 0,50 z' color='white'/> </node> <node operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>88</param> <param name='y'>0</param> </params> </node> <node operation='gegl:dropshadow'> <params> <param name='opacity'>1.2</param> <param name='x'>0</param> <param name='y'>0</param> <param name='radius'>8</param> </params> </node> <node operation='gegl:fill-path'> <params> <
param name='d'>M50,0 C23,0 0,22 0,50 C0,77 22,100 50,100 C68,100 85,90 93,75 L40,75 C35,75 35,65 40,65 L98,65 C100,55 100,45 98,35 L40,35 C35,35 35,25 40,25 L93,25 C84,10 68,0 50,0 z</param> <param name='color'>rgb(1.0000, 1.0000, 1.0000)</param> </params> </node> </node> <node operation='gegl:over'> <node operation='gegl:translate'> <params> <param name='x'>176</param> <param name='y'>0</param> </params> </node> <node operation='gegl:dropshadow'> <params> <param name='opacity'>1.2</param> <param name='x'>0</param> <param name='y'>0</param> <param name='radius'>8</param> </params> </node> <node operation='gegl:fill-path'> <params> <param name='d'>M0,50 C0,78 24,100 50,100 C77,100 100,78 100,50 C100,45 99,40 98,35 C82,35 66,35 50,35 C42,35 35,42 35,50 C35,58 42,65 50,65 C56,65 61,61 64,56 C67,51 75,55 73,60 C69,69 60,75 50,75 C36,75 25,64 25,50 C25,36 36,25 50,25 L93,25 C83,9 67,0 49,0 C25,0 0,20 0,50 z</param> <param name='color'>rgb(1.0000, 1.0000, 1.0000)</param> </params>
</node> </node> <node operation='gegl:translate'> <params> <param name='x'>264</param> <param name='y'>0</param> </params> </node> <node operation='gegl:dropshadow'> <params> <param name='opacity'>1.2</param> <param name='x'>0</param> <param name='y'>0</param> <param name='radius'>8</param> </params> </node> <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(1.0000, 1.0000, 1.0000)</param> </params> </node> </node> <node operation='gegl:rotate'> <params> <param name='origin-x'>0</param> <param name='origin-y'>0</param> <param name='filter'>linear</param> <param name='degrees'>42</param> </params> </node> <node operation='gegl:checkerboard'> <params> <param name='x'>43</param> <param name='y'>44</param> <param name='x-offset'>0</param> <param name='y-offset'>0</param> <param name='color1'>rgb(0.7097, 0.7097, 0.7097)</param> <param name='co
lor2'>rgb(0.7661, 0.7661, 0.7661)</param> </params> </node> </gegl>"
#define STDIN_BUF_SIZE 128
diff --git a/docs/gallery/clones.xml b/docs/gallery/clones.xml
index 69e1211..9ff1806 100644
--- a/docs/gallery/clones.xml
+++ b/docs/gallery/clones.xml
@@ -12,7 +12,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.200000</param>
<param name='y'>0.200000</param>
</params>
@@ -45,7 +44,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.200000</param>
<param name='y'>0.200000</param>
</params>
@@ -66,7 +64,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.200000</param>
<param name='y'>0.200000</param>
</params>
@@ -90,7 +87,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.200000</param>
<param name='y'>0.200000</param>
</params>
@@ -159,7 +155,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.500000</param>
<param name='y'>0.500000</param>
</params>
diff --git a/operations/transform/transform-core.c b/operations/transform/transform-core.c
index 385caee..55547d4 100644
--- a/operations/transform/transform-core.c
+++ b/operations/transform/transform-core.c
@@ -24,7 +24,6 @@
*/
/* TODO: only calculate pixels inside transformed polygon */
-/* TODO: should hard edges always be used when only scaling? */
/* TODO: make rect calculations depend on the sampling kernel of the
* interpolation filter used */
@@ -49,8 +48,6 @@ enum
PROP_ORIGIN_X = 1,
PROP_ORIGIN_Y,
PROP_FILTER,
- PROP_HARD_EDGES,
- PROP_LANCZOS_WIDTH
};
static void gegl_transform_finalize (GObject *object);
@@ -219,20 +216,6 @@ op_transform_class_init (OpTransformClass *klass)
_("Filter type (nearest, linear, lanczos, cubic, lohalo)"),
"linear",
G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
- g_object_class_install_property (gobject_class, PROP_HARD_EDGES,
- g_param_spec_boolean (
- "hard-edges",
- _("Hard edges"),
- _("Hard edges"),
- FALSE,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
- g_object_class_install_property (gobject_class, PROP_LANCZOS_WIDTH,
- g_param_spec_int (
- "lanczos-width",
- _("Lanczos width"),
- _("Width of the Lanczos function"),
- 3, 6, 3,
- G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
}
static void
@@ -266,12 +249,6 @@ gegl_transform_get_property (GObject *object,
case PROP_FILTER:
g_value_set_string (value, self->filter);
break;
- case PROP_HARD_EDGES:
- g_value_set_boolean (value, self->hard_edges);
- break;
- case PROP_LANCZOS_WIDTH:
- g_value_set_int (value, self->lanczos_width);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -298,12 +275,6 @@ gegl_transform_set_property (GObject *object,
g_free (self->filter);
self->filter = g_value_dup_string (value);
break;
- case PROP_HARD_EDGES:
- self->hard_edges = g_value_get_boolean (value);
- break;
- case PROP_LANCZOS_WIDTH:
- self->lanczos_width = g_value_get_int (value);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
diff --git a/operations/transform/transform-core.h b/operations/transform/transform-core.h
index 0a00811..b2bf995 100644
--- a/operations/transform/transform-core.h
+++ b/operations/transform/transform-core.h
@@ -21,8 +21,6 @@ struct _OpTransform
gdouble origin_x;
gdouble origin_y;
gchar *filter;
- gboolean hard_edges;
- gint lanczos_width;
};
typedef struct _OpTransformClass OpTransformClass;
diff --git a/tests/compositions/clones.xml b/tests/compositions/clones.xml
index 146484c..5ce40fb 100644
--- a/tests/compositions/clones.xml
+++ b/tests/compositions/clones.xml
@@ -12,7 +12,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.200000</param>
<param name='y'>0.200000</param>
</params>
@@ -45,7 +44,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.200000</param>
<param name='y'>0.200000</param>
</params>
@@ -66,7 +64,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.200000</param>
<param name='y'>0.200000</param>
</params>
@@ -90,7 +87,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.200000</param>
<param name='y'>0.200000</param>
</params>
@@ -161,7 +157,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
<param name='x'>0.500000</param>
<param name='y'>0.500000</param>
</params>
diff --git a/tests/compositions/composite-transform.xml b/tests/compositions/composite-transform.xml
index 12cde45..25b97a4 100644
--- a/tests/compositions/composite-transform.xml
+++ b/tests/compositions/composite-transform.xml
@@ -14,8 +14,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
- <param name='lanczos-width'>3</param>
<param name='x'>0.500000</param>
<param name='y'>0.500000</param>
</params>
diff --git a/tests/compositions/transform.xml b/tests/compositions/transform.xml
index 84b590c..23b28dd 100644
--- a/tests/compositions/transform.xml
+++ b/tests/compositions/transform.xml
@@ -6,8 +6,6 @@
<param name='origin-x'>0.000000</param>
<param name='origin-y'>0.000000</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
- <param name='lanczos-width'>3</param>
<param name='x'>0.500000</param>
<param name='y'>0.500000</param>
</params>
diff --git a/tests/xml/data/rgb-params.xml b/tests/xml/data/rgb-params.xml
index b8cd2bd..a5fd5fc 100644
--- a/tests/xml/data/rgb-params.xml
+++ b/tests/xml/data/rgb-params.xml
@@ -6,8 +6,6 @@
<param name='origin-x'>0</param>
<param name='origin-y'>0</param>
<param name='filter'>linear</param>
- <param name='hard-edges'>false</param>
- <param name='lanczos-width'>3</param>
<param name='x'>5</param>
<param name='y'>0</param>
</params>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]