]> git.saurik.com Git - wxWidgets.git/commitdiff
corrected a bug in the masking code
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 11 Aug 2001 09:43:26 +0000 (09:43 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 11 Aug 2001 09:43:26 +0000 (09:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/bitmap.cpp
src/mac/carbon/bitmap.cpp

index 300609dd86cfeea3d46cb1d0710acec796b47160..2e85e12323ea20762c84129677a8b5c995dbb37a 100644 (file)
@@ -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);
               }
index 300609dd86cfeea3d46cb1d0710acec796b47160..2e85e12323ea20762c84129677a8b5c995dbb37a 100644 (file)
@@ -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);
               }