[pango] Win32: Reset BkMode so ETO doesn't draw its own
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Win32: Reset BkMode so ETO doesn't draw its own
- Date: Sat, 8 Apr 2017 01:54:50 +0000 (UTC)
commit 72e16506d6bd43efe4db24ebc3f69537f7208b1a
Author: Nicolas Hake <nh nosebud de>
Date: Mon Jul 11 13:22:05 2016 +0200
Win32: Reset BkMode so ETO doesn't draw its own
If the DC's background mode is set to OPAQUE, ExtTextOut will draw its
own background boxes around glyph items. Since we don't place any
requirements on the DC, set the background mode to TRANSPARENT before
rendering any glyphs (and reset it to its original value afterwards).
https://bugzilla.gnome.org/show_bug.cgi?id=768679
pango/pangowin32.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index d39cf8b..04e0d51 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -1020,6 +1020,7 @@ pango_win32_render_layout_line (HDC hdc,
PangoRectangle overall_rect;
PangoRectangle logical_rect;
PangoRectangle ink_rect;
+ int oldbkmode = SetBkMode (hdc, TRANSPARENT);
int x_off = 0;
@@ -1145,6 +1146,8 @@ pango_win32_render_layout_line (HDC hdc,
x_off += logical_rect.width;
}
+
+ SetBkMode (hdc, oldbkmode);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]