X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f38924e863cd44e2abd49d20d201d72aa773c51e..b04fcede8f8f29cbade858ff81247ffbdc482d27:/src/common/effects.cpp diff --git a/src/common/effects.cpp b/src/common/effects.cpp index ed11c6934d..4439ff42ba 100644 --- a/src/common/effects.cpp +++ b/src/common/effects.cpp @@ -20,12 +20,11 @@ #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 */ @@ -89,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()); @@ -104,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)