summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <daniel.hirt@samsung.com>2015-08-03 16:10:11 +0300
committerDaniel Hirt <daniel.hirt@samsung.com>2015-08-31 12:49:38 +0300
commit8b8351f8ee4f2e45a347a67d4508ce588f5a0ea4 (patch)
tree9920d3e19e7ff7a883b0c79ae8cdb86cb808ffe1
parent0be1c90c747d3fd7037b8c435b0373553fa1d2f4 (diff)
Evas Textblock: add more debug info
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 824c1825df..3886e2adb5 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -10951,6 +10951,7 @@ evas_textblock_cursor_range_simple_geometry_get(const Evas_Textblock_Cursor *cur
10951 /* Add middle rect */ 10951 /* Add middle rect */
10952 if ((ln1->par->y + ln1->y + ln1->h) != (ln2->par->y + ln2->y)) 10952 if ((ln1->par->y + ln1->y + ln1->h) != (ln2->par->y + ln2->y))
10953 { 10953 {
10954 printf("Middle rect\n");
10954 tr = calloc(1, sizeof(Evas_Textblock_Rectangle)); 10955 tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
10955 tr->x = lm; 10956 tr->x = lm;
10956 tr->y = ln1->par->y + ln1->y + ln1->h; 10957 tr->y = ln1->par->y + ln1->y + ln1->h;
@@ -12346,7 +12347,10 @@ typedef struct
12346{ 12347{
12347 int idx; 12348 int idx;
12348 Evas_Coord x, y, w, h; 12349 Evas_Coord x, y, w, h;
12350 Evas_Textblock_Item_Type type;
12351 Evas_Script_Type script;
12349 Eina_Rectangle *rect; 12352 Eina_Rectangle *rect;
12353 Eina_Bool is_rtl : 1;
12350} Textblock_Item_Debug_Data; 12354} Textblock_Item_Debug_Data;
12351 12355
12352EAPI Eina_List * 12356EAPI Eina_List *
@@ -12366,19 +12370,30 @@ _evas_textblock_items_get(const Evas_Object *obj)
12366 EINA_INLIST_FOREACH(par->lines, ln) 12370 EINA_INLIST_FOREACH(par->lines, ln)
12367 { 12371 {
12368 Evas_Object_Textblock_Item *it; 12372 Evas_Object_Textblock_Item *it;
12373 Evas_Coord marginl = 0;
12374 if (ln->items)
12375 {
12376 marginl = ln->items->format->margin.l;
12377 }
12369 EINA_INLIST_FOREACH(ln->items, it) 12378 EINA_INLIST_FOREACH(ln->items, it)
12370 { 12379 {
12371 Textblock_Item_Debug_Data *d = calloc(1, sizeof(Textblock_Item_Debug_Data)); 12380 Textblock_Item_Debug_Data *d = calloc(1, sizeof(Textblock_Item_Debug_Data));
12372 d->idx = idx++; 12381 d->idx = idx++;
12373 d->w = it->w; 12382 d->w = it->w;
12374 d->h = it->h; 12383 d->h = it->h;
12375 d->x = it->x; 12384 d->x = it->x + marginl;
12376 d->y = ln->y; 12385 d->y = ln->y;
12377 d->rect = eina_rectangle_new(it->x, par->y + ln->y, it->w, it->h); 12386 d->type = it->type;
12387 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
12388 {
12389 Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
12390 d->script = ti->text_props.script;
12391 d->is_rtl = (ti->text_props.bidi_dir == EVAS_BIDI_DIRECTION_RTL);
12392 }
12393 d->rect = eina_rectangle_new(ln->x + it->x + marginl, par->y + ln->y, it->w, it->h);
12378 rects = eina_list_append(rects, d); 12394 rects = eina_list_append(rects, d);
12379 } 12395 }
12380 } 12396 }
12381
12382 } 12397 }
12383 return rects; 12398 return rects;
12384} 12399}