Evas textblock + font engine: Don't take inset into account when not needed.

SVN revision: 53353
This commit is contained in:
Tom Hacohen 2010-10-13 13:33:59 +00:00
parent a44992380f
commit 8d0492fcfd
2 changed files with 6 additions and 6 deletions

View File

@ -6598,7 +6598,7 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
pos,
&x, &y, &w, &h);
}
x += ln->x + it->x - it->inset;
x += ln->x + it->x;
if (x < ln->x)
{
x = ln->x;
@ -7251,9 +7251,9 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
yoff = (it->format->valign * (double)(ln->h - it->h)) + it->baseline; \
if (clip) \
{ \
if ((obj->cur.geometry.x + x + ln->x + it->x - it->inset + it->w) < (cx - 20)) \
if ((obj->cur.geometry.x + x + ln->x + it->x + it->w) < (cx - 20)) \
continue; \
if ((obj->cur.geometry.x + x + ln->x + it->x - it->inset) > (cx + cw + 20)) \
if ((obj->cur.geometry.x + x + ln->x + it->x) > (cx + cw + 20)) \
break; \
}
@ -7274,7 +7274,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
(obj->cur.cache.clip.a * it->format->color.col.a * (amul)) / 65025);
# define DRAW_TEXT(ox, oy) \
if (it->format->font.font) ENFN->font_draw(output, context, surface, it->format->font.font, \
obj->cur.geometry.x + ln->x + it->x - it->inset + x + (ox), \
obj->cur.geometry.x + ln->x + it->x + x + (ox), \
obj->cur.geometry.y + ln->y + yoff + y + (oy), \
it->w, it->h, it->w, it->h, it->text, &it->bidi_props);
# if 0

View File

@ -440,8 +440,8 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *in_text, c
last_adv = fg->glyph->advance.x >> 16;
}
if (kern < 0) kern = 0;
chr_x = (pen_x - kern);
chr_y = (pen_y);
chr_x = (pen_x - kern) + (fg->glyph_out->left);
chr_y = (pen_y) + (fg->glyph_out->top);
chr_w = fg->glyph_out->bitmap.width + (kern);
/* if (text[chr]) */
{