[gegl/abyss: 19/22] buffer: use floor of coordinates instead of just casting to integer in GEGL_SAMPLER_CUBIC



commit 868bfdf52480d498e49f967bac99742690d19d7c
Author: Ville Sokk <ville sokk gmail com>
Date:   Mon Jul 9 11:59:00 2012 +0300

    buffer: use floor of coordinates instead of just casting to integer in GEGL_SAMPLER_CUBIC

 gegl/buffer/gegl-sampler-cubic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-cubic.c b/gegl/buffer/gegl-sampler-cubic.c
index e9d827d..7279d65 100644
--- a/gegl/buffer/gegl-sampler-cubic.c
+++ b/gegl/buffer/gegl-sampler-cubic.c
@@ -157,8 +157,8 @@ gegl_sampler_cubic_get (GeglSampler     *self,
   gint              i;
 
   context_rect = self->context_rect[0];
-  dx = (gint) x;
-  dy = (gint) y;
+  dx = (gint) floor (x);
+  dy = (gint) floor (y);
   sampler_bptr = gegl_sampler_get_ptr (self, dx, dy, repeat_mode);
 
      {



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