From 8de443dd9f426c325673d029786618da9476f6a0 Mon Sep 17 00:00:00 2001 From: Nicolas Hake Date: Mon, 11 Jul 2016 13:27:31 +0200 Subject: 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 --- pango/pangowin32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pango/pangowin32.c') 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); -- cgit v1.2.1