From c29416e0d897e25b3273252c1a90aa9c61b59db8 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 23 Feb 2012 06:07:37 +0000 Subject: [PATCH] fix update region handling with scaling. SVN revision: 68303 --- legacy/evas/ChangeLog | 4 ++++ legacy/evas/src/lib/canvas/evas_object_image.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/legacy/evas/ChangeLog b/legacy/evas/ChangeLog index c2cb50943a..8f789a5eaa 100644 --- a/legacy/evas/ChangeLog +++ b/legacy/evas/ChangeLog @@ -667,3 +667,7 @@ 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). diff --git a/legacy/evas/src/lib/canvas/evas_object_image.c b/legacy/evas/src/lib/canvas/evas_object_image.c index 2553ec4624..4ebea0886a 100644 --- a/legacy/evas/src/lib/canvas/evas_object_image.c +++ b/legacy/evas/src/lib/canvas/evas_object_image.c @@ -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,