summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Hake <nh@nosebud.de>2016-07-11 13:27:31 +0200
committerMatthias Clasen <mclasen@redhat.com>2017-04-07 21:54:29 -0400
commit8de443dd9f426c325673d029786618da9476f6a0 (patch)
tree2c705117b1ccd5e403a382c63cc5cfc65dc664bd
parent3166cbf809d5b005b587319ee2ef3e73e00d466e (diff)
downloadpango-8de443dd9f426c325673d029786618da9476f6a0.tar.gz
Win32: Fix background rect bounds
Rectangle() uses x1, y1, x2, y2 coordinates instead of x, y, w, h. Fix the coordinates passed to the function so it draws the background in the correct location. https://bugzilla.gnome.org/show_bug.cgi?id=768679
-rw-r--r--pango/pangowin32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 1abe3335..f25ceacc 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -1059,8 +1059,8 @@ pango_win32_render_layout_line (HDC hdc,
old_pen = SelectObject (hdc, GetStockObject (NULL_PEN));
Rectangle (hdc, x + PANGO_PIXELS (x_off + logical_rect.x),
y + PANGO_PIXELS (overall_rect.y),
- PANGO_PIXELS (logical_rect.width),
- PANGO_PIXELS (overall_rect.height));
+ 1 + x + PANGO_PIXELS (x_off + logical_rect.x + logical_rect.width),
+ 1 + y + PANGO_PIXELS (overall_rect.y + overall_rect.height));
SelectObject (hdc, old_brush);
DeleteObject (bg_brush);
SelectObject (hdc, old_pen);