Mercurial > emacs
comparison src/xterm.c @ 95245:4e2f379d6e44
(x_draw_glyph_string): Be sure to draw underline within the current
line area.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 23 May 2008 05:33:08 +0000 |
parents | 626cda8569ae |
children | 9a9e4682d009 |
comparison
equal
deleted
inserted
replaced
95244:91375185a2f2 | 95245:4e2f379d6e44 |
---|---|
2741 position = s->font->underline_position; | 2741 position = s->font->underline_position; |
2742 else if (s->font) | 2742 else if (s->font) |
2743 position = (s->font->descent + 1) / 2; | 2743 position = (s->font->descent + 1) / 2; |
2744 } | 2744 } |
2745 } | 2745 } |
2746 /* Check the sanity of thickness and position. We should | |
2747 avoid drawing underline out of the current line area. */ | |
2748 if (s->y + s->height <= s->ybase + position) | |
2749 position = s->y + s->height - 1; | |
2750 if (s->y + s->height < s->ybase + position + thickness) | |
2751 thickness = (s->y + s->height) - (s->ybase + position); | |
2746 s->underline_thickness = thickness; | 2752 s->underline_thickness = thickness; |
2747 s->underline_position = position; | 2753 s->underline_position = position; |
2748 y = s->ybase + position; | 2754 y = s->ybase + position; |
2749 if (s->face->underline_defaulted_p) | 2755 if (s->face->underline_defaulted_p) |
2750 XFillRectangle (s->display, s->window, s->gc, | 2756 XFillRectangle (s->display, s->window, s->gc, |