[gegl] Move gegl_sampler_compute_scale to gegl-buffer.h



commit ace2600f334e71618caf0f52f38f1db5123a9918
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Tue Nov 19 11:49:00 2013 -0800

    Move gegl_sampler_compute_scale to gegl-buffer.h

 gegl/buffer/gegl-buffer.h |   29 +++++++++++++++++++++++++++++
 gegl/gegl-plugin.h        |   29 -----------------------------
 2 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer.h b/gegl/buffer/gegl-buffer.h
index ec31c7f..6cde687 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -497,6 +497,35 @@ void              gegl_sampler_get            (GeglSampler    *sampler,
                                                void           *output,
                                                GeglAbyssPolicy repeat_mode);
 
+/* code template utility, updates the jacobian matrix using
+ * a user defined mapping function for displacement, example
+ * with an identity transform (note that for the identity
+ * transform this is massive computational overhead that can
+ * be skipped by passing NULL to the sampler.
+ *
+ * #define gegl_unmap(x,y,dx,dy) { dx=x; dy=y; }
+ *
+ * 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_SAMPLER_LOHALO);
+ *
+ * #undef gegl_unmap      // IMPORTANT undefine map macro
+ */
+#define gegl_sampler_compute_scale(matrix, x, y) \
+{                                       \
+  float ax, ay, bx, by;                 \
+  gegl_unmap(x + 0.5, y, ax, ay);       \
+  gegl_unmap(x - 0.5, y, bx, by);       \
+  matrix.coeff[0][0] = ax - bx;         \
+  matrix.coeff[1][0] = ay - by;         \
+  gegl_unmap(x, y + 0.5, ax, ay);       \
+  gegl_unmap(x, y - 0.5, bx, by);       \
+  matrix.coeff[0][1] = ax - bx;         \
+  matrix.coeff[1][1] = ay - by;         \
+}
+
+
 /**
  * gegl_sampler_get_context_rect:
  * @sampler: a GeglSampler gotten from gegl_buffer_sampler_new
diff --git a/gegl/gegl-plugin.h b/gegl/gegl-plugin.h
index 6b4569e..641fce0 100644
--- a/gegl/gegl-plugin.h
+++ b/gegl/gegl-plugin.h
@@ -84,35 +84,6 @@ void            gegl_extension_handler_register_saver
 const gchar   * gegl_extension_handler_get         (const gchar         *extension);
 const gchar   * gegl_extension_handler_get_saver   (const gchar         *extension);
 
-
-/* code template utility, updates the jacobian matrix using
- * a user defined mapping function for displacement, example
- * with an identity transform (note that for the identity
- * transform this is massive computational overhead that can
- * be skipped by passing NULL to the sampler.
- *
- * #define gegl_unmap(x,y,dx,dy) { dx=x; dy=y; }
- *
- * 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_SAMPLER_LOHALO);
- *
- * #undef gegl_unmap      // IMPORTANT undefine map macro
- */
-#define gegl_sampler_compute_scale(matrix, x, y) \
-{                                       \
-  float ax, ay, bx, by;                 \
-  gegl_unmap(x + 0.5, y, ax, ay);       \
-  gegl_unmap(x - 0.5, y, bx, by);       \
-  matrix.coeff[0][0] = ax - bx;         \
-  matrix.coeff[1][0] = ay - by;         \
-  gegl_unmap(x, y + 0.5, ax, ay);       \
-  gegl_unmap(x, y - 0.5, bx, by);       \
-  matrix.coeff[0][1] = ax - bx;         \
-  matrix.coeff[1][1] = ay - by;         \
-}
-
 #include <operation/gegl-operation.h>
 #include <operation/gegl-operation-filter.h>
 #include <operation/gegl-operation-area-filter.h>


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