Evas Textblock/text: Add clipping until we fix inset handling.
authorTom Hacohen <tom@stosb.com>
Tue, 29 Mar 2011 13:52:42 +0000 (13:52 +0000)
committerTom Hacohen <tom@stosb.com>
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.

SVN revision: 58184

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

index a42c80484b84253d02d157e5b68b6bd77f7e8b46..5f39f787497901d1a4a58ca6a0515283d4c9c171 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 c4bd9d5f70d5e0b14761aea4443f412d1ce5308a..1fcf5cf28b037f9d4d6cc2b4947dd3e869d99072 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. */