revert bits for XBM bitmaps under MSW

adapt XBM usage in wxAUI to this logic


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-08-24 09:54:36 +00:00
parent e1b1b6be56
commit c4d3971185
3 changed files with 4 additions and 5 deletions

View File

@@ -76,8 +76,8 @@ static wxBitmap BitmapFromBits(const unsigned char bits[], int w, int h,
const wxColour& color) const wxColour& color)
{ {
wxImage img = wxBitmap((const char*)bits, w, h).ConvertToImage(); wxImage img = wxBitmap((const char*)bits, w, h).ConvertToImage();
img.Replace(255,255,255,123,123,123); img.Replace(0,0,0,123,123,123);
img.Replace(0,0,0,color.Red(),color.Green(),color.Blue()); img.Replace(255,255,255,color.Red(),color.Green(),color.Blue());
img.SetMaskColour(123,123,123); img.SetMaskColour(123,123,123);
return wxBitmap(img); return wxBitmap(img);
} }

View File

@@ -293,8 +293,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))) ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
{ {
wxImage img = wxBitmap((const char*)close_bits, 16, 16).ConvertToImage(); wxImage img = wxBitmap((const char*)close_bits, 16, 16).ConvertToImage();
img.Replace(255,255,255,123,123,123); img.Replace(0,0,0,123,123,123);
img.Replace(0,0,0,255,255,255);
img.SetMaskColour(123,123,123); img.SetMaskColour(123,123,123);
m_closeButton = wxBitmap( img ); m_closeButton = wxBitmap( img );
} }

View File

@@ -445,7 +445,7 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
reversed |= (unsigned char)(val & 0x01); reversed |= (unsigned char)(val & 0x01);
val >>= 1; val >>= 1;
} }
*dst++ = reversed; *dst++ = ~reversed;
} }
if ( padding ) if ( padding )