[gegl] ripple: allow to choose the sampler
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] ripple: allow to choose the sampler
- Date: Sun, 4 Sep 2011 17:37:27 +0000 (UTC)
commit aace9a86762fcb2623c650f44f8b61ca6255a762
Author: Michael Murà <batolettre gmail com>
Date: Sun Sep 4 18:47:51 2011 +0200
ripple: allow to choose the sampler
operations/workshop/ripple.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/operations/workshop/ripple.c b/operations/workshop/ripple.c
index 86ea00f..d40d296 100644
--- a/operations/workshop/ripple.c
+++ b/operations/workshop/ripple.c
@@ -36,6 +36,9 @@ gegl_chant_double (phi, _("Phase shift"), -1.0, 1.0, 0.0,
gegl_chant_double (angle, _("Angle"), -180.0, 180.0, 0.0,
_("Angle in degree"))
+gegl_chant_enum (sampler_type, _("Sampler"), GeglSamplerType, GEGL_TYPE_SAMPLER_TYPE,
+ GEGL_SAMPLER_CUBIC, _("Sampler used internaly"))
+
#else
#define GEGL_CHANT_TYPE_AREA_FILTER
@@ -79,10 +82,9 @@ process (GeglOperation *operation,
gfloat *out_pixel = dst_buf;
- GeglSamplerType sampler_type = gegl_sampler_type_from_string ("cubic");
- GeglSampler *sampler = gegl_buffer_sampler_new (input,
- babl_format ("RGBA float"),
- sampler_type);
+ GeglSampler *sampler = gegl_buffer_sampler_new (input,
+ babl_format ("RGBA float"),
+ o->sampler_type);
gint n_pixels = result->width * result->height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]