diff options
author | Owen Taylor <otaylor@src.gnome.org> | 2004-02-29 20:46:30 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2004-02-29 20:46:30 +0000 |
commit | 25c8ec71bed7f5daa42b17220e0bf00a1ef1e3bc (patch) | |
tree | dd9deb76034448b2e12777d8a62df99405f6388b /pango/pangoft2.c | |
parent | b1a7956a523e80a793461cc11d8d15c6b51b4dcc (diff) | |
download | pango-25c8ec71bed7f5daa42b17220e0bf00a1ef1e3bc.tar.gz |
un Feb 29 15:31:09 2004 Owen Taylor <otaylor@redhat.com>
Patch from Nicolas Setton, #114237
* pango/pango-attributes.h pango/pango-markup.c: Add a
new underline type, PANGO_UNDERLINE_ERROR.
* pango/pangowin32.c pango/pangox.c pango/pangoft2.c:
Implement drawing of PANGO_UNDERLINE_ERROR.
* pango/pango-layout.c (pango_layout_run_get_extents):
Handle PANGO_UNDERLINE_ERROR.
Diffstat (limited to 'pango/pangoft2.c')
-rw-r--r-- | pango/pangoft2.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pango/pangoft2.c b/pango/pangoft2.c index cc1b4c54..a6706c76 100644 --- a/pango/pangoft2.c +++ b/pango/pangoft2.c @@ -807,6 +807,29 @@ pango_ft2_render_layout_line (FT_Bitmap *bitmap, x + PANGO_PIXELS (x_off + ink_rect.x), x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width)); break; + case PANGO_UNDERLINE_ERROR: + { + int point_x; + int counter = 0; + int end_x = x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width); + + for (point_x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1; + point_x < end_x; + point_x += 2) + { + if (counter) + pango_ft2_draw_hline (bitmap, + risen_y + 2, + point_x, MIN (point_x + 1, end_x)); + else + pango_ft2_draw_hline (bitmap, + risen_y + 3, + point_x, MIN (point_x + 1, end_x)); + + counter = (counter + 1) % 2; + } + } + break; case PANGO_UNDERLINE_LOW: pango_ft2_draw_hline (bitmap, risen_y + PANGO_PIXELS (ink_rect.y + ink_rect.height), |