fix update region handling with scaling.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 23 Feb 2012 06:07:37 +0000 (06:07 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 23 Feb 2012 06:07:37 +0000 (06:07 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@68303 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/canvas/evas_object_image.c

index c2cb509..8f789a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        For example, this can be used to nicely change the font and size
        in a text editor.
 
+2012-02-23  Carsten Haitzler (The Rasterman)
+
+        * Fix rouding of update regions for image objects when scaled
+        (leaves trails without this).
index 2553ec4..4ebea08 100644 (file)
@@ -3401,10 +3401,10 @@ evas_object_image_render_pre(Evas_Object *obj)
                                  y = idy;
                                  h = ((int)(idy + idh)) - y;
                                  
-                                 r.x = ((rr->x - 1) * w) / o->cur.image.w;
-                                 r.y = ((rr->y - 1) * h) / o->cur.image.h;
-                                 r.w = ((rr->w + 2) * w) / o->cur.image.w;
-                                 r.h = ((rr->h + 2) * h) / o->cur.image.h;
+                                 r.x = (rr->x * w) / o->cur.image.w;
+                                 r.y = (rr->y * h) / o->cur.image.h;
+                                 r.w = ((rr->w * w) + (o->cur.image.w * 2) - 1) / o->cur.image.w;
+                                 r.h = ((rr->h * h) + (o->cur.image.h * 2) - 1) / o->cur.image.h;
                                  r.x += obj->cur.geometry.x + x;
                                  r.y += obj->cur.geometry.y + y;
                                  RECTS_CLIP_TO_RECT(r.x, r.y, r.w, r.h,