SVN revision: 56553
This commit is contained in:
Tom Hacohen 2011-01-30 13:55:12 +00:00
parent d6feccdebb
commit 13dce619f1
3 changed files with 11 additions and 7 deletions

View File

@ -32,7 +32,7 @@
do \ do \
{ \ { \
int visible = 1; \ 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 = 0; \
_char_index_d = 1; \ _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 #else
#define EVAS_FONT_WALK_TEXT_LOGICAL_START() EVAS_FONT_WALK_TEXT_VISUAL_START() #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_PEN_Y (EVAS_FONT_ROUND_26_6_TO_INT(_pen_y))
#define EVAS_FONT_WALK_Y_ADV (0) #define EVAS_FONT_WALK_Y_ADV (0)
#define EVAS_FONT_WALK_IS_LAST \ #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 \ #define EVAS_FONT_WALK_IS_FIRST \
(!char_index) (!char_index)
#define EVAS_FONT_WALK_LEN (text_props->len) #define EVAS_FONT_WALK_LEN (text_props->len)

View File

@ -535,7 +535,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
LKU(fi->ft_mutex); LKU(fi->ft_mutex);
continue; 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; visible = 0;
} }

View File

@ -202,6 +202,7 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *in_text, c
goto end; goto end;
} }
position += text_props->start;
Evas_Coord cluster_start, last_end; Evas_Coord cluster_start, last_end;
int prev_cluster = -1; int prev_cluster = -1;
int found = 0, items = 1, item_pos = 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 prev_cluster = -1;
int found = 0, items = 1, item_pos = 1; int found = 0, items = 1, item_pos = 1;
int last_is_visible = 1; int last_is_visible = 1;
position += text_props->start;
EVAS_FONT_WALK_TEXT_VISUAL_START() EVAS_FONT_WALK_TEXT_VISUAL_START()
{ {
EVAS_FONT_WALK_TEXT_WORK(); 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: 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. /* position of the char after the last char in the text that will fit in xy.
@ -507,7 +509,7 @@ end:
*/ */
EAPI int 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 asc, desc;
int ret=-1; int ret=-1;
@ -532,6 +534,6 @@ evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *in_text
end: end:
return ret; return ret - text_props->start;
} }