From: tasn Date: Tue, 29 Mar 2011 13:52:42 +0000 (+0000) Subject: Evas Textblock/text: Add clipping until we fix inset handling. X-Git-Tag: submit/trunk/20120815.174732~1785 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f9801e2c410dbe1785bd994104ad461e7e2b54e;p=profile%2Fivi%2Fevas.git Evas Textblock/text: Add clipping until we fix inset handling. Currently inset handling is not handled correctly so we just clip to the left if there's no enough margin to draw the what overflows. This is the same behavior that was done up until now because of the global clipper that was applied. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@58184 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/canvas/evas_object_text.c b/src/lib/canvas/evas_object_text.c index a42c804..5f39f78 100644 --- a/src/lib/canvas/evas_object_text.c +++ b/src/lib/canvas/evas_object_text.c @@ -1890,6 +1890,12 @@ evas_object_text_render(Evas_Object *obj, void *output, void *context, void *sur evas_text_style_pad_get(o->cur.style, &sl, NULL, &st, NULL); ENFN->context_multiplier_unset(output, context); ENFN->context_render_op_set(output, context, obj->cur.render_op); + /* FIXME: This clipping is just until we fix inset handling correctly. */ + ENFN->context_clip_clip(output, context, + obj->cur.geometry.x + x, + obj->cur.geometry.y + y, + obj->cur.geometry.w, + obj->cur.geometry.h); /* ENFN->context_color_set(output, context, diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index c4bd9d5..1fcf5cf 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -8295,6 +8295,12 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void o = (Evas_Object_Textblock *)(obj->object_data); obj->layer->evas->engine.func->context_multiplier_unset(output, context); + /* FIXME: This clipping is just until we fix inset handling correctly. */ + ENFN->context_clip_clip(output, context, + obj->cur.geometry.x + x, + obj->cur.geometry.y + y, + obj->cur.geometry.w, + obj->cur.geometry.h); clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch); /* If there are no paragraphs and thus there are no lines, * there's nothing left to do. */