Evas Textblock/text: Add clipping until we fix inset handling.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 29 Mar 2011 13:52:42 +0000 (13:52 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 29 Mar 2011 13:52:42 +0000 (13:52 +0000)
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: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@58184 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_text.c
src/lib/canvas/evas_object_textblock.c

index a42c804..5f39f78 100644 (file)
@@ -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,
index c4bd9d5..1fcf5cf 100644 (file)
@@ -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. */