mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0187: MS-Windows: rendering artifacts with DirectX renderer
Problem: MS-Windows: rendering artifacts with DirectX renderer
Solution: Enable ETO_CLIPPED for DirectWrite rendering in
gui_mch_draw_string() to ensure glyphs stay within their
cell boundaries (Yasuhiro Matsumoto).
closes: #19711
Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f9bed026ac
commit
6238ee9f89
@@ -6666,6 +6666,16 @@ gui_mch_draw_string(
|
||||
pcliprect = &rc;
|
||||
foptions = ETO_CLIPPED;
|
||||
}
|
||||
#ifdef FEAT_DIRECTX
|
||||
// DirectWrite anti-aliasing can extend glyph pixels beyond cell
|
||||
// boundaries, leaving artifacts when adjacent cells are not
|
||||
// redrawn. Clip to the cell rect to prevent this.
|
||||
else if (IS_ENABLE_DIRECTX())
|
||||
{
|
||||
pcliprect = &rc;
|
||||
foptions = ETO_CLIPPED;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
SetTextColor(s_hdc, gui.currFgColor);
|
||||
SelectFont(s_hdc, gui.currFont);
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
187,
|
||||
/**/
|
||||
186,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user