From 5f63467b1d95796ea9051335b14f074bf9485b21 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 8 Dec 2012 16:02:09 +0100 Subject: [PATCH] Improve scaling of border bitmap (WB) The StretchBlt mode is set from dither to delete. --- winboard/winboard.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/winboard/winboard.c b/winboard/winboard.c index df3a37f..3616957 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -3351,7 +3351,7 @@ DrawBackgroundOnDC(HDC hdc) HDC tmphdc; HBITMAP hbm; static char oldBorder[MSG_SIZ]; - int w = 600, h = 600; + int w = 600, h = 600, mode; if(strcmp(appData.border, oldBorder)) { // load new one when old one no longer valid strncpy(oldBorder, appData.border, MSG_SIZ-1); @@ -3367,8 +3367,10 @@ DrawBackgroundOnDC(HDC hdc) w = bi.bmWidth; h = bi.bmHeight; } + mode = SetStretchBltMode(hdc, COLORONCOLOR); StretchBlt(hdc, boardRect.left, boardRect.top, boardRect.right - boardRect.left, boardRect.bottom - boardRect.top, tmphdc, 0, 0, w, h, SRCCOPY); + SetStretchBltMode(hdc, mode); SelectObject(tmphdc, hbm); DeleteDC(tmphdc); } -- 1.7.0.4