summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2004-02-29 20:46:30 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-02-29 20:46:30 +0000
commit25c8ec71bed7f5daa42b17220e0bf00a1ef1e3bc (patch)
treedd9deb76034448b2e12777d8a62df99405f6388b /pango/pangowin32.c
parentb1a7956a523e80a793461cc11d8d15c6b51b4dcc (diff)
downloadpango-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/pangowin32.c')
-rw-r--r--pango/pangowin32.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 97e84d46..d143aef9 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -801,6 +801,29 @@ pango_win32_render_layout_line (HDC hdc,
points[0].y = points[1].y = y + 2;
Polyline (hdc, points, 2);
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)
+ {
+ points[0].x = point_x;
+ points[1].x = MAX (point_x + 1, end_x);
+
+ if (counter)
+ points[0].y = points[1].y = y + 2;
+ else
+ points[0].y = points[1].y = y + 3;
+
+ Polyline (hdc, points, 2);
+ counter = (counter + 1) % 2;
+ }
+ }
+ break;
case PANGO_UNDERLINE_LOW:
points[0].x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1;
points[0].y = points[1].y = y + PANGO_PIXELS (ink_rect.y + ink_rect.height) + 2;