#ifndef WX_PRECOMP
#include "wx/dcmemory.h"
+ #include "wx/pen.h"
+ #include "wx/settings.h"
+ #include "wx/gdicmn.h"
#endif //WX_PRECOMP
-#include "wx/gdicmn.h"
-#include "wx/pen.h"
-#include "wx/settings.h"
-
/*
* wxEffects: various 3D effects
*/
bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap)
{
- static bool hiColour = (wxDisplayDepth() >= 16) ;
-
int w = bitmap.GetWidth();
int h = bitmap.GetHeight();
wxMemoryDC dcMem;
#if wxUSE_PALETTE
+ static bool hiColour = (wxDisplayDepth() >= 16) ;
if (bitmap.GetPalette() && !hiColour)
{
dc.SetPalette(* bitmap.GetPalette());
}
#endif // wxUSE_PALETTE
- dcMem.SelectObject(bitmap);
+ dcMem.SelectObjectAsSource(bitmap);
int i, j;
for (i = rect.x; i < rect.x + rect.width; i += w)