From: tasn Date: Sun, 30 Jan 2011 13:55:12 +0000 (+0000) Subject: Snap 2 X-Git-Tag: 2.0_alpha~240^2~1106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66c113787b440a282b6cc2cab6d35f5c700627f4;p=framework%2Fuifw%2Fevas.git Snap 2 git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56553 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/engines/common/evas_font_default_walk.x b/src/lib/engines/common/evas_font_default_walk.x index 2071e2d..75c9906 100644 --- a/src/lib/engines/common/evas_font_default_walk.x +++ b/src/lib/engines/common/evas_font_default_walk.x @@ -32,7 +32,7 @@ do \ { \ int visible = 1; \ - for (char_index = 0 ; char_index < text_props->len ; char_index++) \ + for (char_index = text_props->start ; char_index < text_props->start + text_props->len ; char_index++) \ { /** @@ -64,7 +64,9 @@ char_index = 0; \ _char_index_d = 1; \ } \ - for ( ; _i > 0 ; char_index += _char_index_d, _i--) \ + char_index += text_props->start; \ + _i += text_props->start; \ + for ( ; _i > text_props->start ; char_index += _char_index_d, _i--) \ { #else #define EVAS_FONT_WALK_TEXT_LOGICAL_START() EVAS_FONT_WALK_TEXT_VISUAL_START() @@ -131,7 +133,7 @@ #define EVAS_FONT_WALK_PEN_Y (EVAS_FONT_ROUND_26_6_TO_INT(_pen_y)) #define EVAS_FONT_WALK_Y_ADV (0) #define EVAS_FONT_WALK_IS_LAST \ - (char_index + 1 == text_props->len) + (char_index + 1 == text_props->start + text_props->len) #define EVAS_FONT_WALK_IS_FIRST \ (!char_index) #define EVAS_FONT_WALK_LEN (text_props->len) diff --git a/src/lib/engines/common/evas_font_draw.c b/src/lib/engines/common/evas_font_draw.c index 9e8cc5c..a4c81d7 100644 --- a/src/lib/engines/common/evas_font_draw.c +++ b/src/lib/engines/common/evas_font_draw.c @@ -535,7 +535,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font LKU(fi->ft_mutex); continue; } - if (EVAS_FONT_CHARACTER_IS_INVISIBLE(text[EVAS_FONT_WALK_POS])) + if (EVAS_FONT_CHARACTER_IS_INVISIBLE(text[EVAS_FONT_WALK_POS - text_props->start])) { visible = 0; } diff --git a/src/lib/engines/common/evas_font_query.c b/src/lib/engines/common/evas_font_query.c index 0f21992..bd5322b 100644 --- a/src/lib/engines/common/evas_font_query.c +++ b/src/lib/engines/common/evas_font_query.c @@ -202,6 +202,7 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *in_text, c goto end; } + position += text_props->start; Evas_Coord cluster_start, last_end; int prev_cluster = -1; int found = 0, items = 1, item_pos = 1; @@ -335,6 +336,7 @@ evas_common_font_query_pen_coords(RGBA_Font *fn, const Eina_Unicode *in_text, co int prev_cluster = -1; int found = 0, items = 1, item_pos = 1; int last_is_visible = 1; + position += text_props->start; EVAS_FONT_WALK_TEXT_VISUAL_START() { EVAS_FONT_WALK_TEXT_WORK(); @@ -496,7 +498,7 @@ evas_common_font_query_char_at_coords(RGBA_Font *fn, const Eina_Unicode *in_text } end: - return ret_val; + return ret_val - text_props->start; } /* position of the char after the last char in the text that will fit in xy. @@ -507,7 +509,7 @@ end: */ EAPI int -evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *in_text, const Evas_Text_Props *text_props __UNUSED__, int x, int y) +evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *in_text, const Evas_Text_Props *text_props, int x, int y) { int asc, desc; int ret=-1; @@ -532,6 +534,6 @@ evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *in_text end: - return ret; + return ret - text_props->start; }