aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-02-23 22:11:02 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-02-23 22:11:02 +0900
commit8ca7a21403f93f69bfc921f85b8df95ab6edbe43 (patch)
treea7720b6d70f1270b79625514356d99b7921fc1c4 /src
parentEmotion test: fix calculation of the displayed time. (diff)
downloadefl-8ca7a21403f93f69bfc921f85b8df95ab6edbe43.tar.gz
textgrid - out-of-bounds chars cause update artifacts - fix.
over-redner by 1 char cell in each direction of an update region to clean up overflow artifacts.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_textgrid.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c
index a68480e3dc..0020ed0528 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -915,13 +915,29 @@ evas_object_textgrid_render_pre(Evas_Object *eo_obj,
{
Evas_Object_Textgrid_Row *r = &(o->cur.rows[i]);
if (r->ch1 >= 0)
- evas_add_rect(&obj->layer->evas->clip_changes,
- obj->cur->geometry.x +
- (r->ch1 * o->cur.char_width),
- obj->cur->geometry.y +
- (i * o->cur.char_height),
- (r->ch2 - r->ch1 + 1) * o->cur.char_width,
- o->cur.char_height);
+ {
+ Evas_Coord chx, chy, chw, chh;
+
+ chx = r->ch1 * o->cur.char_width;
+ chy = i * o->cur.char_height;
+ chw = (r->ch2 - r->ch1 + 1) * o->cur.char_width;
+ chh = o->cur.char_height;
+
+ chx -= o->cur.char_width;
+ chy -= o->cur.char_height;
+ chw += o->cur.char_width * 2;
+ chh += o->cur.char_height * 2;
+
+ chx += obj->cur->geometry.x;
+ chy += obj->cur->geometry.y;
+ RECTS_CLIP_TO_RECT(chx, chy, chw, chh,
+ obj->cur->cache.clip.x,
+ obj->cur->cache.clip.y,
+ obj->cur->cache.clip.w,
+ obj->cur->cache.clip.h);
+ evas_add_rect(&obj->layer->evas->clip_changes,
+ chx, chy, chw, chh);
+ }
}
}
}