From: Stefan Csomor Date: Sat, 11 Aug 2001 09:43:26 +0000 (+0000) Subject: corrected a bug in the masking code X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2af9ef13a7ac6918348b2eca0ea474a402d34fe0 corrected a bug in the masking code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/bitmap.cpp b/src/mac/bitmap.cpp index 300609dd86..2e85e12323 100644 --- a/src/mac/bitmap.cpp +++ b/src/mac/bitmap.cpp @@ -593,7 +593,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth) { for (int x = 0; x < width; x++) { - if ( data[0] == image.GetMaskRed() && data[1] == image.GetMaskRed() && data[2] == image.GetMaskRed() ) + if ( data[0] == image.GetMaskRed() && data[1] == image.GetMaskGreen() && data[2] == image.GetMaskBlue() ) { SetCPixel(x,y, &white); } diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 300609dd86..2e85e12323 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -593,7 +593,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth) { for (int x = 0; x < width; x++) { - if ( data[0] == image.GetMaskRed() && data[1] == image.GetMaskRed() && data[2] == image.GetMaskRed() ) + if ( data[0] == image.GetMaskRed() && data[1] == image.GetMaskGreen() && data[2] == image.GetMaskBlue() ) { SetCPixel(x,y, &white); }