X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd1eb4e315ca84b5d1b574ab3f6308885ed097c2..fc5414a1c6c55fcf9fd7f5bffb09b9b9eaf1d4bf:/src/common/rgncmn.cpp diff --git a/src/common/rgncmn.cpp b/src/common/rgncmn.cpp index 0cf6f5ae06..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,7 +23,9 @@ #include "wx/region.h" #include "wx/bitmap.h" +#if wxUSE_IMAGE #include "wx/image.h" +#endif #include "wx/dcmemory.h" @@ -37,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; @@ -52,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; @@ -114,6 +117,10 @@ bool wxRegion::Union(const wxBitmap& bmp, } return TRUE; +#else + // No wxImage support + return FALSE; +#endif } //---------------------------------------------------------------------------