From: Vadim Zeitlin Date: Thu, 28 Mar 2002 00:37:52 +0000 (+0000) Subject: use PALETTERGB instead of RGB when creating wxMask from colour X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f423f4dbbba8bd969babfcdd98507f01788c9f85 use PALETTERGB instead of RGB when creating wxMask from colour git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 086d472183..3d725cfea2 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -1265,7 +1265,7 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) // scan the bitmap for the transparent colour and set the corresponding // pixels in the mask to BLACK and the rest to WHITE - COLORREF maskColour = RGB(colour.Red(), colour.Green(), colour.Blue()); + COLORREF maskColour = wxColourToPalRGB(colour); m_maskBitmap = (WXHBITMAP)::CreateBitmap(width, height, 1, 1, 0); HDC srcDC = ::CreateCompatibleDC(NULL);