]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/rgncmn.cpp
made wxNumberEntryDialog public; extracted it and wxGetNumberFromUser() in a separate...
[wxWidgets.git] / src / common / rgncmn.cpp
index 0cf6f5ae06a6c1ff65af474ae060534cdd5292a2..41b273e76c123fcafd185384c16654c831e0f6c9 100644 (file)
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "rgncmn.h"
 #endif
 
 #pragma implementation "rgncmn.h"
 #endif
 
@@ -23,7 +23,9 @@
 
 #include "wx/region.h"
 #include "wx/bitmap.h"
 
 #include "wx/region.h"
 #include "wx/bitmap.h"
+#if wxUSE_IMAGE
 #include "wx/image.h"
 #include "wx/image.h"
+#endif
 #include "wx/dcmemory.h"
 
 
 #include "wx/dcmemory.h"
 
 
@@ -37,10 +39,10 @@ wxBitmap wxRegion::ConvertToBitmap() const
     wxBitmap bmp(box.GetRight(), box.GetBottom());
     wxMemoryDC dc;
     dc.SelectObject(bmp);
     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.Clear();
     dc.SetClippingRegion(*this);
-    dc.SetBackground(*wxBLACK_BRUSH);
+    dc.SetBackground(*wxWHITE_BRUSH);
     dc.Clear();
     dc.SelectObject(wxNullBitmap);
     return bmp;
     dc.Clear();
     dc.SelectObject(wxNullBitmap);
     return bmp;
@@ -52,6 +54,7 @@ bool wxRegion::Union(const wxBitmap& bmp,
                      const wxColour& transColour,
                      int   tolerance)
 {
                      const wxColour& transColour,
                      int   tolerance)
 {
+#if wxUSE_IMAGE
     unsigned char loR, loG, loB;
     unsigned char hiR, hiG, hiB;
 
     unsigned char loR, loG, loB;
     unsigned char hiR, hiG, hiB;
 
@@ -114,6 +117,10 @@ bool wxRegion::Union(const wxBitmap& bmp,
     }
 
     return TRUE;
     }
 
     return TRUE;
+#else
+    // No wxImage support
+    return FALSE;
+#endif
 }
 
 //---------------------------------------------------------------------------
 }
 
 //---------------------------------------------------------------------------