From 761598d4e5b9f59bfc773e06f843c070d920f8b9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 12 Dec 2005 11:15:23 +0000 Subject: [PATCH] fixed handling of dst offset in wxAlphaBlend() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dc.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 6cc73510af..cf75d3e84e 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -131,10 +131,13 @@ static bool AlphaBlt(HDC hdcDst, const wxBitmap& bmpSrc); #ifdef wxHAVE_RAW_BITMAP -// our (limited) AlphaBlend() replacement + +// our (limited) AlphaBlend() replacement for Windows versions not providing it static void -wxAlphaBlend(HDC hdcDst, int x, int y, int w, int h, int srcX, int srcY, const wxBitmap& bmp); -#endif +wxAlphaBlend(HDC hdcDst, int x, int y, int w, int h, + int srcX, int srcY, const wxBitmap& bmp); + +#endif // wxHAVE_RAW_BITMAP // ---------------------------------------------------------------------------- // private classes @@ -2562,14 +2565,16 @@ static bool AlphaBlt(HDC hdcDst, #ifdef wxHAVE_RAW_BITMAP static void -wxAlphaBlend(HDC hdcDst, int xDst, int yDst, int w, int h, int srcX, int srcY, const wxBitmap& bmpSrc) +wxAlphaBlend(HDC hdcDst, int xDst, int yDst, + int w, int h, + int srcX, int srcY, const wxBitmap& bmpSrc) { // get the destination DC pixels wxBitmap bmpDst(w, h, 32 /* force creating RGBA DIB */); MemoryHDC hdcMem; SelectInHDC select(hdcMem, GetHbitmapOf(bmpDst)); - if ( !::BitBlt(hdcMem, 0, 0, w, h, hdcDst, 0, 0, SRCCOPY) ) + if ( !::BitBlt(hdcMem, 0, 0, w, h, hdcDst, xDst, yDst, SRCCOPY) ) { wxLogLastError(_T("BitBlt")); } -- 2.45.2