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



commit ae0759ec8089830960a525919d87339cc29ee0fc
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]