X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1542ea396a625766c59d683adbb1d613c1344d50..5955710c8bd346e8be675bd1dbbd427723a57920:/src/common/rgncmn.cpp?ds=sidebyside diff --git a/src/common/rgncmn.cpp b/src/common/rgncmn.cpp index c794b59ab9..41b273e76c 100644 --- a/src/common/rgncmn.cpp +++ b/src/common/rgncmn.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "rgncmn.h" #endif @@ -23,6 +23,9 @@ #include "wx/region.h" #include "wx/bitmap.h" +#if wxUSE_IMAGE +#include "wx/image.h" +#endif #include "wx/dcmemory.h" @@ -36,10 +39,10 @@ wxBitmap wxRegion::ConvertToBitmap() const wxBitmap bmp(box.GetRight(), box.GetBottom()); wxMemoryDC dc; dc.SelectObject(bmp); - dc.SetBackground(*wxWHITE_BRUSH); + dc.SetBackground(*wxBLACK_BRUSH); dc.Clear(); dc.SetClippingRegion(*this); - dc.SetBackground(*wxBLACK_BRUSH); + dc.SetBackground(*wxWHITE_BRUSH); dc.Clear(); dc.SelectObject(wxNullBitmap); return bmp; @@ -51,6 +54,7 @@ bool wxRegion::Union(const wxBitmap& bmp, const wxColour& transColour, int tolerance) { +#if wxUSE_IMAGE unsigned char loR, loG, loB; unsigned char hiR, hiG, hiB; @@ -113,6 +117,10 @@ bool wxRegion::Union(const wxBitmap& bmp, } return TRUE; +#else + // No wxImage support + return FALSE; +#endif } //---------------------------------------------------------------------------