X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd05139a8023fd3e30476409fafbe04221c6d627..291b0f5b14b62be240ae5cb1ec2ade3d8db6a776:/src/common/effects.cpp diff --git a/src/common/effects.cpp b/src/common/effects.cpp index a70f7032e2..4439ff42ba 100644 --- a/src/common/effects.cpp +++ b/src/common/effects.cpp @@ -88,14 +88,13 @@ void wxEffects::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int WXUNUSED(border 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()); @@ -103,7 +102,7 @@ bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap) } #endif // wxUSE_PALETTE - dcMem.SelectObject(bitmap); + dcMem.SelectObjectAsSource(bitmap); int i, j; for (i = rect.x; i < rect.x + rect.width; i += w)