From: H.G. Muller Date: Sat, 8 Dec 2012 15:02:09 +0000 (+0100) Subject: Improve scaling of border bitmap (WB) X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5f63467b1d95796ea9051335b14f074bf9485b21;p=xboard.git Improve scaling of border bitmap (WB) The StretchBlt mode is set from dither to delete. --- 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); }