Fix rounding error in map clip bounds calculation
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 12 Dec 2011 08:23:24 +0000 (08:23 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 12 Dec 2011 08:23:24 +0000 (08:23 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@66111 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/canvas/evas_map.c

index 8a411ff..39e8b7e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * Textblock: Added evas_textblock_markup_to_plain.
        This lets you convert textblock markup to plain text.
        This converts formats and everything correctly.
+
+2011-12-12 Carsten Haitzler (The Rasterman)
+
+        * Fix rounding error in map clip bounds calculation
+
index 74a6584..2359d5a 100644 (file)
@@ -86,10 +86,14 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
    p++;
    for (; p < p_end; p++)
      {
-        if (p->x < x1) x1 = p->x;
-        if (p->x > x2) x2 = p->x;
-        if (p->y < y1) y1 = p->y;
-        if (p->y > y2) y2 = p->y;
+        Evas_Coord x, y;
+        
+        x = lround(p->x);
+        y = lround(p->y);
+        if (x < x1) x1 = x;
+        if (x > x2) x2 = x;
+        if (y < y1) y1 = y;
+        if (y > y2) y2 = y;
      }
 // this causes clip-out bugs now mapped objs canbe opaque!!!   
 //   // add 1 pixel of fuzz around the map region to ensure updates are correct