-unsigned char wxAuiBlendColour(unsigned char fg, unsigned char bg, double alpha);
-wxColor wxAuiStepColour(const wxColor& c, int percent);
-
-static wxBitmap MakeDisabledBitmap(wxBitmap& bmp)
-{
- wxImage image = bmp.ConvertToImage();
-
- int mr, mg, mb;
- mr = image.GetMaskRed();
- mg = image.GetMaskGreen();
- mb = image.GetMaskBlue();
-
- unsigned char* data = image.GetData();
- int width = image.GetWidth();
- int height = image.GetHeight();
- bool has_mask = image.HasMask();
-
- for (int y = height-1; y >= 0; --y)
- {
- for (int x = width-1; x >= 0; --x)
- {
- data = image.GetData() + (y*(width*3))+(x*3);
- unsigned char* r = data;
- unsigned char* g = data+1;
- unsigned char* b = data+2;
-
- if (has_mask && *r == mr && *g == mg && *b == mb)
- continue;
-
- *r = wxAuiBlendColour(*r, 255, 0.4);
- *g = wxAuiBlendColour(*g, 255, 0.4);
- *b = wxAuiBlendColour(*b, 255, 0.4);
- }
- }
-
- return wxBitmap(image);
-}
-