fix update region handling with scaling.

SVN revision: 68303
This commit is contained in:
Carsten Haitzler 2012-02-23 06:07:37 +00:00
parent 367799c1ec
commit c29416e0d8
2 changed files with 8 additions and 4 deletions

View File

@ -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).

View 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,