[gegl] rename all GEGL_INTERPOLATION_* to GEGL_SAMPLER_*



commit 500bef586bf05d8c50bedd1f5b1ee35d35909711
Author: Michael Murà <batolettre gmail com>
Date:   Sat Jul 9 12:08:17 2011 +0200

    rename all GEGL_INTERPOLATION_* to GEGL_SAMPLER_*

 gegl/buffer/gegl-buffer.h                   |   14 +++++++-------
 gegl/buffer/gegl-sampler.c                  |   22 +++++++++++-----------
 gegl/gegl-plugin.h                          |    2 +-
 gegl/gegl-types.c                           |   10 +++++-----
 gegl/gegl-types.h                           |   10 +++++-----
 operations/common/map-absolute.c            |    2 +-
 operations/common/map-relative.c            |    2 +-
 operations/common/mirrors.c                 |    2 +-
 operations/workshop/convolution-matrix.c    |    2 +-
 operations/workshop/cubism.c                |    2 +-
 operations/workshop/external/gluas.c        |    4 ++--
 operations/workshop/external/lens-correct.c |    2 +-
 operations/workshop/fractal-trace.c         |    4 ++--
 operations/workshop/lens-distortion.c       |    2 +-
 operations/workshop/noise-spread.c          |    4 ++--
 operations/workshop/plasma.c                |    8 ++++----
 operations/workshop/polar-coordinates.c     |    2 +-
 operations/workshop/whirl-pinch.c           |    2 +-
 18 files changed, 48 insertions(+), 48 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer.h b/gegl/buffer/gegl-buffer.h
index 02f387c..0df7e3c 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -320,9 +320,9 @@ GeglBuffer *    gegl_buffer_dup               (GeglBuffer       *buffer);
  * @dest: buffer capable of storing one pixel in @format.
  * @format: the format to store the sampled color in.
  * @sampler_type: the sampler type to use,
- * to be ported from working code. Valid values: GEGL_INTERPOLATION_NEAREST,
- * GEGL_INTERPOLATION_LINEAR, GEGL_INTERPOLATION_CUBIC,
- * GEGL_INTERPOLATION_LANCZOS and GEGL_INTERPOLATION_LOHALO
+ * to be ported from working code. Valid values: GEGL_SAMPLER_NEAREST,
+ * GEGL_SAMPLER_LINEAR, GEGL_SAMPLER_CUBIC,
+ * GEGL_SAMPLER_LANCZOS and GEGL_SAMPLER_LOHALO
  *
  * Query interpolate pixel values at a given coordinate using a specified form
  * of interpolation. The samplers used cache for a small neighbourhood of the
@@ -357,7 +357,7 @@ void            gegl_buffer_sample_cleanup    (GeglBuffer *buffer);
  * @string: the string to look up
  *
  * Looks up the GeglInterpolation corresponding to a string, if no matching
- * interpolation is found GEGL_INTERPOLATION_NEAREST is returned.
+ * interpolation is found GEGL_SAMPLER_NEAREST is returned.
  */
 GeglSamplerType gegl_sampler_type_from_string (const gchar *string);
 
@@ -366,9 +366,9 @@ GeglSamplerType gegl_sampler_type_from_string (const gchar *string);
  * @buffer: buffer to create a new sampler for
  * @format: format we want data back in
  * @sampler_type: the sampler type to use,
- * to be ported from working code. Valid values: GEGL_INTERPOLATION_NEAREST,
- * GEGL_INTERPOLATION_LINEAR, GEGL_INTERPOLATION_CUBIC,
- * GEGL_INTERPOLATION_LANCZOS and GEGL_INTERPOLATION_LOHALO
+ * to be ported from working code. Valid values: GEGL_SAMPLER_NEAREST,
+ * GEGL_SAMPLER_LINEAR, GEGL_SAMPLER_CUBIC,
+ * GEGL_SAMPLER_LANCZOS and GEGL_SAMPLER_LOHALO
  *
  * Create a new sampler, when you are done with the sampler, g_object_unref
  * it.
diff --git a/gegl/buffer/gegl-sampler.c b/gegl/buffer/gegl-sampler.c
index a66ee1c..8037ca9 100644
--- a/gegl/buffer/gegl-sampler.c
+++ b/gegl/buffer/gegl-sampler.c
@@ -528,20 +528,20 @@ gegl_sampler_type_from_string (const gchar *string)
 {
   if (g_str_equal (string, "nearest") ||
       g_str_equal (string, "none"))
-    return GEGL_INTERPOLATION_NEAREST;
+    return GEGL_SAMPLER_NEAREST;
 
   if (g_str_equal (string, "linear") ||
       g_str_equal (string, "bilinear"))
-    return GEGL_INTERPOLATION_LINEAR;
+    return GEGL_SAMPLER_LINEAR;
 
   if (g_str_equal (string, "cubic") ||
       g_str_equal (string, "bicubic"))
-    return GEGL_INTERPOLATION_CUBIC;
+    return GEGL_SAMPLER_CUBIC;
 
   if (g_str_equal (string, "lohalo"))
-    return GEGL_INTERPOLATION_LOHALO;
+    return GEGL_SAMPLER_LOHALO;
 
-  return GEGL_INTERPOLATION_NEAREST;
+  return GEGL_SAMPLER_NEAREST;
 }
 
 GType
@@ -551,15 +551,15 @@ gegl_sampler_gtype_from_enum (GeglSamplerType sampler_type)
 {
   switch (sampler_type)
     {
-      case GEGL_INTERPOLATION_NEAREST:
+      case GEGL_SAMPLER_NEAREST:
         return GEGL_TYPE_SAMPLER_NEAREST;
-      case GEGL_INTERPOLATION_LINEAR:
+      case GEGL_SAMPLER_LINEAR:
         return GEGL_TYPE_SAMPLER_LINEAR;
-      case GEGL_INTERPOLATION_CUBIC:
+      case GEGL_SAMPLER_CUBIC:
         return GEGL_TYPE_SAMPLER_CUBIC;
-      case GEGL_INTERPOLATION_LANCZOS:
+      case GEGL_SAMPLER_LANCZOS:
         return GEGL_TYPE_SAMPLER_LANCZOS;
-      case GEGL_INTERPOLATION_LOHALO:
+      case GEGL_SAMPLER_LOHALO:
         return GEGL_TYPE_SAMPLER_LOHALO;
       default:
         return GEGL_TYPE_SAMPLER_LINEAR;
@@ -576,7 +576,7 @@ gegl_buffer_sampler_new (GeglBuffer       *buffer,
   if (format == NULL)
     format = babl_format ("RaGaBaA float");
   desired_type = gegl_sampler_gtype_from_enum (sampler_type);
-  if (sampler_type == GEGL_INTERPOLATION_LANCZOS)
+  if (sampler_type == GEGL_SAMPLER_LANCZOS)
       sampler = g_object_new (desired_type,
                               "format", format,
                               "buffer", buffer,
diff --git a/gegl/gegl-plugin.h b/gegl/gegl-plugin.h
index c9aae48..0ba48c9 100644
--- a/gegl/gegl-plugin.h
+++ b/gegl/gegl-plugin.h
@@ -103,7 +103,7 @@ const gchar   * gegl_extension_handler_get_saver   (const gchar         *extensi
  * gegl_sampler_compute_scale (scale, x, y);
  * gegl_unmap(x,y,sample_x,sample_y);
  * gegl_buffer_sample (buffer, sample_x, sample_y, scale, dest, format,
- *                     GEGL_INTERPOLATION_LOHALO);
+ *                     GEGL_SAMPLER_LOHALO);
  *
  * #undef gegl_unmap      // IMPORTANT undefine map macro
  */
diff --git a/gegl/gegl-types.c b/gegl/gegl-types.c
index bc63235..1bf2d39 100644
--- a/gegl/gegl-types.c
+++ b/gegl/gegl-types.c
@@ -26,11 +26,11 @@ gegl_sampler_type_get_type (void)
     static GType etype = 0;
     if (etype == 0) {
         static const GEnumValue values[] = {
-            { GEGL_INTERPOLATION_NEAREST,   "GEGL_INTERPOLATION_NEAREST",   "nearest"   },
-            { GEGL_INTERPOLATION_LINEAR,    "GEGL_INTERPOLATION_LINEAR",    "linear"    },
-            { GEGL_INTERPOLATION_CUBIC,     "GEGL_INTERPOLATION_CUBIC",     "cubic"     },
-            { GEGL_INTERPOLATION_LANCZOS,   "GEGL_INTERPOLATION_LANCZOS",   "lanczos"   },
-            { GEGL_INTERPOLATION_LOHALO,    "GEGL_INTERPOLATION_LOHALO",    "lohalo"    },
+            { GEGL_SAMPLER_NEAREST,   "GEGL_SAMPLER_NEAREST",   "nearest"   },
+            { GEGL_SAMPLER_LINEAR,    "GEGL_SAMPLER_LINEAR",    "linear"    },
+            { GEGL_SAMPLER_CUBIC,     "GEGL_SAMPLER_CUBIC",     "cubic"     },
+            { GEGL_SAMPLER_LANCZOS,   "GEGL_SAMPLER_LANCZOS",   "lanczos"   },
+            { GEGL_SAMPLER_LOHALO,    "GEGL_SAMPLER_LOHALO",    "lohalo"    },
             { 0, NULL, NULL }
         };
         etype = g_enum_register_static ("GeglSamplerTypeType", values);
diff --git a/gegl/gegl-types.h b/gegl/gegl-types.h
index ef8e303..6e1f594 100644
--- a/gegl/gegl-types.h
+++ b/gegl/gegl-types.h
@@ -65,11 +65,11 @@ GType gegl_processor_get_type  (void) G_GNUC_CONST;
 #define GEGL_IS_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_PROCESSOR))
 
 typedef enum {
-  GEGL_INTERPOLATION_NEAREST = 0,
-  GEGL_INTERPOLATION_LINEAR,
-  GEGL_INTERPOLATION_CUBIC,
-  GEGL_INTERPOLATION_LANCZOS,
-  GEGL_INTERPOLATION_LOHALO
+  GEGL_SAMPLER_NEAREST = 0,
+  GEGL_SAMPLER_LINEAR,
+  GEGL_SAMPLER_CUBIC,
+  GEGL_SAMPLER_LANCZOS,
+  GEGL_SAMPLER_LOHALO
 } GeglSamplerType;
 GType gegl_sampler_type_get_type   (void) G_GNUC_CONST;
 #define GEGL_TYPE_SAMPLER_TYPE (gegl_sampler_type_get_type())
diff --git a/operations/common/map-absolute.c b/operations/common/map-absolute.c
index c0e444d..11fffda 100644
--- a/operations/common/map-absolute.c
+++ b/operations/common/map-absolute.c
@@ -20,7 +20,7 @@
 #ifdef GEGL_CHANT_PROPERTIES
 
 gegl_chant_enum (sampler_type, _("Sampler"), GeglSamplerType, GEGL_TYPE_SAMPLER_TYPE,
-                 GEGL_INTERPOLATION_CUBIC, _("Sampler used internaly"))
+                 GEGL_SAMPLER_CUBIC, _("Sampler used internaly"))
 
 #else
 
diff --git a/operations/common/map-relative.c b/operations/common/map-relative.c
index c9f1b1e..20d6517 100644
--- a/operations/common/map-relative.c
+++ b/operations/common/map-relative.c
@@ -24,7 +24,7 @@ gegl_chant_double (scaling, _("Scaling"), 0.0, 5000.0, 1.0,
        _("scaling factor of displacement, indicates how large spatial"
          " displacement a relative mapping value of 1.0 corresponds to."))
 gegl_chant_enum (sampler_type, _("Sampler"), GeglSamplerType, GEGL_TYPE_SAMPLER_TYPE,
-                 GEGL_INTERPOLATION_CUBIC, _("Sampler used internaly"))
+                 GEGL_SAMPLER_CUBIC, _("Sampler used internaly"))
 
 #else
 
diff --git a/operations/common/mirrors.c b/operations/common/mirrors.c
index 259f90c..cf50185 100644
--- a/operations/common/mirrors.c
+++ b/operations/common/mirrors.c
@@ -234,7 +234,7 @@ apply_mirror (double               mirror_angle,
 
 
 #ifndef DO_NOT_USE_BUFFER_SAMPLE
-        gegl_buffer_sample (src, cx, cy, NULL, &dst_buf[(row * roi->width + col) * 4], format, GEGL_INTERPOLATION_LINEAR);
+        gegl_buffer_sample (src, cx, cy, NULL, &dst_buf[(row * roi->width + col) * 4], format, GEGL_SAMPLER_LINEAR);
 #endif
 
 #ifdef DO_NOT_USE_BUFFER_SAMPLE
diff --git a/operations/workshop/convolution-matrix.c b/operations/workshop/convolution-matrix.c
index 05e9d6e..4bb023d 100644
--- a/operations/workshop/convolution-matrix.c
+++ b/operations/workshop/convolution-matrix.c
@@ -274,7 +274,7 @@ convolve_pixel(gfloat               *src_buf,
                     gfloat temp_color[4];
                     gegl_buffer_sample (input, s_x, s_y, NULL, temp_color,
                                         babl_format ("RGBA float"),
-                                        GEGL_INTERPOLATION_NEAREST);
+                                        GEGL_SAMPLER_NEAREST);
                     if (i!=3 && o->weight)
                       sum += matrix[x][y] * temp_color[i]
                         * temp_color[3];
diff --git a/operations/workshop/cubism.c b/operations/workshop/cubism.c
index 6c8e669..4809ecf 100644
--- a/operations/workshop/cubism.c
+++ b/operations/workshop/cubism.c
@@ -514,7 +514,7 @@ process (GeglOperation       *operation,
       iy = CLAMP (y, boundary.y, boundary.y + boundary.height - 1);
 
       gegl_buffer_sample (input, ix, iy, NULL, color, format,
-                          GEGL_INTERPOLATION_NEAREST);
+                          GEGL_SAMPLER_NEAREST);
 
       fill_poly_color (&poly, &extended, &boundary, dst_buf, color);
     }
diff --git a/operations/workshop/external/gluas.c b/operations/workshop/external/gluas.c
index 0fe7e91..536f1d9 100644
--- a/operations/workshop/external/gluas.c
+++ b/operations/workshop/external/gluas.c
@@ -244,7 +244,7 @@ get_rgba_pixel (void       *data,
         return;
       gegl_buffer_sample (p->in_drawable, x, y, NULL, buf,
                           p->rgba_float,
-                          GEGL_INTERPOLATION_NEAREST);
+                          GEGL_SAMPLER_NEAREST);
       for (i = 0; i < 4; i++)
         pixel[i] = buf[i];
     }
@@ -255,7 +255,7 @@ get_rgba_pixel (void       *data,
         return;
       gegl_buffer_sample (p->aux_drawable, x, y, NULL, buf,
                           p->rgba_float,
-                          GEGL_INTERPOLATION_NEAREST);
+                          GEGL_SAMPLER_NEAREST);
       for (i = 0; i < 4; i++)
         pixel[i] = buf[i];
     }
diff --git a/operations/workshop/external/lens-correct.c b/operations/workshop/external/lens-correct.c
index 8ae002e..cdf01ce 100644
--- a/operations/workshop/external/lens-correct.c
+++ b/operations/workshop/external/lens-correct.c
@@ -393,7 +393,7 @@ lens_distort_newl (gfloat              *src_buf,
                   gfloat color[4];
                   gegl_buffer_sample (input, tmpx+x, tmpy+y, NULL, color,
                                       babl_format ("RGBA float"),
-                                      GEGL_INTERPOLATION_NEAREST);
+                                      GEGL_SAMPLER_NEAREST);
                   val += color[rgb] * wx[x] * wy[y];
                   wt += wx[x] * wy[y];
                 }
diff --git a/operations/workshop/fractal-trace.c b/operations/workshop/fractal-trace.c
index 1bde0ae..199ea52 100644
--- a/operations/workshop/fractal-trace.c
+++ b/operations/workshop/fractal-trace.c
@@ -174,7 +174,7 @@ fractaltrace (GeglBuffer          *input,
       if (0 <= px && px < picture->width && 0 <= py && py < picture->height)
         {
           gegl_buffer_sample (input, px, py, &scale, dest, format,
-                              GEGL_INTERPOLATION_LOHALO);
+                              GEGL_SAMPLER_LOHALO);
         }
       else
         {
@@ -207,7 +207,7 @@ fractaltrace (GeglBuffer          *input,
                 }
 
               gegl_buffer_sample (input, px, py, &scale, dest, format,
-                                  GEGL_INTERPOLATION_LOHALO);
+                                  GEGL_SAMPLER_LOHALO);
               break;
 
             case BACKGROUND_TYPE_TRANSPARENT:
diff --git a/operations/workshop/lens-distortion.c b/operations/workshop/lens-distortion.c
index 4d36872..9e8c68e 100644
--- a/operations/workshop/lens-distortion.c
+++ b/operations/workshop/lens-distortion.c
@@ -239,7 +239,7 @@ lens_distort_func (gfloat              *src_buf,
             {
               gegl_buffer_sample (input, x, y, NULL, temp,
                                   babl_format ("RGBA float"),
-                                  GEGL_INTERPOLATION_NEAREST);
+                                  GEGL_SAMPLER_NEAREST);
             }
           else
             {
diff --git a/operations/workshop/noise-spread.c b/operations/workshop/noise-spread.c
index c2e12af..72bf4fb 100644
--- a/operations/workshop/noise-spread.c
+++ b/operations/workshop/noise-spread.c
@@ -90,9 +90,9 @@ apply_spread (gint                 x_amount,
       calc_sample_coords (x1, y1, x_amount, y_amount, gr, &x, &y);
       /* Only displace the pixel if it's within the bounds of the image. */
       if (x >= 0 && x < img_width && y >= 0 && y < img_height)
-        gegl_buffer_sample (src, x, y, NULL, &dst_buf[(y1 * roi->width + x1) * 4], format,  GEGL_INTERPOLATION_LINEAR);
+        gegl_buffer_sample (src, x, y, NULL, &dst_buf[(y1 * roi->width + x1) * 4], format,  GEGL_SAMPLER_LINEAR);
       else /* Else just copy it */
-        gegl_buffer_sample (src, x1, y1, NULL, &dst_buf[(y1 * roi->width + x1) * 4], format,  GEGL_INTERPOLATION_LINEAR);
+        gegl_buffer_sample (src, x1, y1, NULL, &dst_buf[(y1 * roi->width + x1) * 4], format,  GEGL_SAMPLER_LINEAR);
     } /* for */
   } /* for */
 
diff --git a/operations/workshop/plasma.c b/operations/workshop/plasma.c
index 20d3b6c..cacbdfb 100644
--- a/operations/workshop/plasma.c
+++ b/operations/workshop/plasma.c
@@ -219,13 +219,13 @@ do_plasma_big (PlasmaContext *context,
         return FALSE;
 
       gegl_buffer_sample (context->output, x1, y1, NULL, tl, babl_format ("RGBA float"),
-                          GEGL_INTERPOLATION_NEAREST);
+                          GEGL_SAMPLER_NEAREST);
       gegl_buffer_sample (context->output, x1, y2, NULL, bl, babl_format ("RGBA float"),
-                          GEGL_INTERPOLATION_NEAREST);
+                          GEGL_SAMPLER_NEAREST);
       gegl_buffer_sample (context->output, x2, y1, NULL, tr, babl_format ("RGBA float"),
-                          GEGL_INTERPOLATION_NEAREST);
+                          GEGL_SAMPLER_NEAREST);
       gegl_buffer_sample (context->output, x2, y2, NULL, br, babl_format ("RGBA float"),
-                          GEGL_INTERPOLATION_NEAREST);
+                          GEGL_SAMPLER_NEAREST);
 
       ran = context->o->turbulence / (2.0 * scale_depth);
 
diff --git a/operations/workshop/polar-coordinates.c b/operations/workshop/polar-coordinates.c
index 342eabf..e3880ae 100644
--- a/operations/workshop/polar-coordinates.c
+++ b/operations/workshop/polar-coordinates.c
@@ -343,7 +343,7 @@ process (GeglOperation       *operation,
 
         if (inside)
           gegl_buffer_sample (input, px, py, &scale, dest, format,
-                              GEGL_INTERPOLATION_LOHALO);
+                              GEGL_SAMPLER_LOHALO);
         else
           for (i=0; i<4; i++)
             dest[i] = 0.0;
diff --git a/operations/workshop/whirl-pinch.c b/operations/workshop/whirl-pinch.c
index 7f2104f..5e71e8f 100644
--- a/operations/workshop/whirl-pinch.c
+++ b/operations/workshop/whirl-pinch.c
@@ -141,7 +141,7 @@ apply_whirl_pinch (gdouble whirl, gdouble pinch, gdouble radius,
   scale_x = 1.0;
   scale_y = roi->width / (gdouble) roi->height;
   sampler = gegl_buffer_sampler_new (src, babl_format ("RaGaBaA float"),
-                                     GEGL_INTERPOLATION_LOHALO);
+                                     GEGL_SAMPLER_LOHALO);
 
   for (row = 0; row < roi->height; row++) {
     for (col = 0; col < roi->width; col++) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]