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)