diff options
author | Tor Lillqvist <tml@novell.com> | 2005-07-22 08:21:17 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-07-22 08:21:17 +0000 |
commit | a7507ca9d7d0679083242cec0c75a973df8ea181 (patch) | |
tree | c3d70aefe997e199665a1336cc56ee3fb1ddf7a0 /pango/pangowin32.c | |
parent | 7a9b8fb2374b6459a52f10e1a1ef732b8cff1c27 (diff) | |
download | pango-a7507ca9d7d0679083242cec0c75a973df8ea181.tar.gz |
No need to include modules.h here any longer. (pango_win32_get_context):
2005-07-22 Tor Lillqvist <tml@novell.com>
* pango/pangowin32.c: No need to include modules.h here any
longer.
(pango_win32_get_context): Remove unused variable.
(pango_win32_render_layout_line): Fix underlining. (#304692)
Mention in the doc comment that the DC's text alignment needs to
have TA_BASELINE and TA_LEFT for underlining to be correct.
* pango/pangowin32-fontmap.c: Include modules.h here instead.
(pango_win32_font_map_class_init): Define variable i.
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r-- | pango/pangowin32.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c index 536542f6..b7769650 100644 --- a/pango/pangowin32.c +++ b/pango/pangowin32.c @@ -30,7 +30,6 @@ #include "pango-utils.h" #include "pangowin32.h" #include "pangowin32-private.h" -#include "modules.h" #define PANGO_WIN32_UNKNOWN_FLAG 0x10000000 @@ -132,7 +131,6 @@ PangoContext * pango_win32_get_context (void) { PangoContext *result; - int i; result = pango_context_new (); pango_context_set_font_map (result, pango_win32_font_map_for_display ()); @@ -866,12 +864,14 @@ pango_win32_get_unknown_glyph (PangoFont *font, /** * pango_win32_render_layout_line: - * @hdc: HDC to use for uncolored drawing + * @hdc: DC to use for uncolored drawing * @line: a #PangoLayoutLine * @x: the x position of start of string (in pixels) * @y: the y position of baseline (in pixels) * - * Render a #PangoLayoutLine onto a device context + * Render a #PangoLayoutLine onto a device context. For underlining to + * work property the text alignment of the DC should have TA_BASELINE + * and TA_LEFT. */ void pango_win32_render_layout_line (HDC hdc, @@ -945,9 +945,13 @@ pango_win32_render_layout_line (HDC hdc, points[0].y = points[1].y = y + 4; points[1].x = x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width); Polyline (hdc, points, 2); - /* Fall through */ + points[0].y = points[1].y = y + 2; + Polyline (hdc, points, 2); + break; case PANGO_UNDERLINE_SINGLE: + points[0].x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1; points[0].y = points[1].y = y + 2; + points[1].x = x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width); Polyline (hdc, points, 2); break; case PANGO_UNDERLINE_ERROR: |