X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9eddec696f06d65a80e7339b2fae14fcb55f8383..a2979ead8d5f5f2023d30d05a3c2d55f7804e24a:/src/common/effects.cpp diff --git a/src/common/effects.cpp b/src/common/effects.cpp index bf68eb4740..4439ff42ba 100644 --- a/src/common/effects.cpp +++ b/src/common/effects.cpp @@ -22,10 +22,9 @@ #include "wx/dcmemory.h" #include "wx/pen.h" #include "wx/settings.h" + #include "wx/gdicmn.h" #endif //WX_PRECOMP -#include "wx/gdicmn.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)