summaryrefslogtreecommitdiff
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
parent0b02540e4e49863f10277b3429d2d92eddda3474 (diff)
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,
915 { 915 {
916 Evas_Object_Textgrid_Row *r = &(o->cur.rows[i]); 916 Evas_Object_Textgrid_Row *r = &(o->cur.rows[i]);
917 if (r->ch1 >= 0) 917 if (r->ch1 >= 0)
918 evas_add_rect(&obj->layer->evas->clip_changes, 918 {
919 obj->cur->geometry.x + 919 Evas_Coord chx, chy, chw, chh;
920 (r->ch1 * o->cur.char_width), 920
921 obj->cur->geometry.y + 921 chx = r->ch1 * o->cur.char_width;
922 (i * o->cur.char_height), 922 chy = i * o->cur.char_height;
923 (r->ch2 - r->ch1 + 1) * o->cur.char_width, 923 chw = (r->ch2 - r->ch1 + 1) * o->cur.char_width;
924 o->cur.char_height); 924 chh = o->cur.char_height;
925
926 chx -= o->cur.char_width;
927 chy -= o->cur.char_height;
928 chw += o->cur.char_width * 2;
929 chh += o->cur.char_height * 2;
930
931 chx += obj->cur->geometry.x;
932 chy += obj->cur->geometry.y;
933 RECTS_CLIP_TO_RECT(chx, chy, chw, chh,
934 obj->cur->cache.clip.x,
935 obj->cur->cache.clip.y,
936 obj->cur->cache.clip.w,
937 obj->cur->cache.clip.h);
938 evas_add_rect(&obj->layer->evas->clip_changes,
939 chx, chy, chw, chh);
940 }
925 } 941 }
926 } 942 }
927 } 943 }