[gegl] comments



commit e725961341f6affea626533f3f0bc53497ec5091
Author: Nicolas Robidoux <nrobidoux git gnome org>
Date:   Fri Nov 23 08:03:04 2012 -0500

    comments

 gegl/buffer/gegl-sampler-lohalo.c  |    8 ++++----
 gegl/buffer/gegl-sampler-nearest.c |    6 ++++--
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-lohalo.c b/gegl/buffer/gegl-sampler-lohalo.c
index 8796b9d..f6a7f20 100644
--- a/gegl/buffer/gegl-sampler-lohalo.c
+++ b/gegl/buffer/gegl-sampler-lohalo.c
@@ -1299,10 +1299,10 @@ gegl_sampler_lohalo_get (      GeglSampler*    restrict  self,
    * ties) within the GIMP convention.
    *
    * The reason why floor gives the index of the closest pixel center
-   * is that absolute positions are corner-based, meaning that the
-   * absolute position of the center of the pixel indexed (0,0) is
-   * (.5,.5) instead of (0,0), as it would be if absolute positions
-   * were center-based.
+   * (with ties resolved toward -infinity) is that absolute positions
+   * are corner-based, meaning that the absolute position of the
+   * center of the pixel indexed (0,0) is (.5,.5) instead of (0,0), as
+   * it would be if absolute positions were center-based.
    */
   const gint ix_0 = floor ((double) absolute_x);
   const gint iy_0 = floor ((double) absolute_y);
diff --git a/gegl/buffer/gegl-sampler-nearest.c b/gegl/buffer/gegl-sampler-nearest.c
index fa803dc..d9a99de 100644
--- a/gegl/buffer/gegl-sampler-nearest.c
+++ b/gegl/buffer/gegl-sampler-nearest.c
@@ -74,8 +74,10 @@ gegl_sampler_nearest_get (GeglSampler     *self,
   /*
    * The reason why floor of the absolute position gives the nearest
    * pixel (with ties resolved toward -infinity) is that the absolute
-   * position is corner based (origin at the top left corner of the
-   * pixel labeled (0,0).
+   * position is corner-based (origin at the top left corner of the
+   * pixel labeled (0,0)) so that the center of the top left pixel is
+   * located at (.5,.5) (instead of (0,0) as it would be if absolute
+   * positions were center-based).
    */
   sampler_bptr =
     gegl_sampler_get_from_buffer (self,



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