X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..f47db8f0676be7807693de8bc38c4851c37f56a2:/src/common/effects.cpp diff --git a/src/common/effects.cpp b/src/common/effects.cpp index ae4c66e40f..965c5724ea 100644 --- a/src/common/effects.cpp +++ b/src/common/effects.cpp @@ -96,11 +96,14 @@ bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap) wxMemoryDC dcMem; +#if wxUSE_PALETTE if (bitmap.GetPalette() && !hiColour) { dc.SetPalette(* bitmap.GetPalette()); dcMem.SetPalette(* bitmap.GetPalette()); } +#endif // wxUSE_PALETTE + dcMem.SelectObject(bitmap); int i, j; @@ -111,11 +114,13 @@ bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap) } dcMem.SelectObject(wxNullBitmap); +#if wxUSE_PALETTE if (bitmap.GetPalette() && !hiColour) { dc.SetPalette(wxNullPalette); dcMem.SetPalette(wxNullPalette); } +#endif // wxUSE_PALETTE return TRUE; }