/////////////////////////////////////////////////////////////////////////////
-// Name: rgncmn.cpp
+// Name: src/common/rgncmn.cpp
// Purpose: Methods of wxRegion that have a generic implementation
// Author: Robin Dunn
// Modified by:
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "rgncmn.h"
-#endif
-
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
#include "wx/region.h"
-#include "wx/bitmap.h"
-#if wxUSE_IMAGE
-#include "wx/image.h"
-#endif
-#include "wx/dcmemory.h"
-
-
-//---------------------------------------------------------------------------
+#ifndef WX_PRECOMP
+ #include "wx/dcmemory.h"
+ #include "wx/bitmap.h"
+ #include "wx/image.h"
+#endif //WX_PRECOMP
wxBitmap wxRegion::ConvertToBitmap() const
bool wxRegion::Union(const wxBitmap& bmp)
{
+#if (!defined(__WXMSW__) || wxUSE_WXDIB)
if (bmp.GetMask())
{
wxImage image = bmp.ConvertToImage();
0);
}
else
+#endif
{
return Union(0, 0, bmp.GetWidth(), bmp.GetHeight());
}
const wxColour& transColour,
int tolerance)
{
+#if (!defined(__WXMSW__) || wxUSE_WXDIB)
wxImage image = bmp.ConvertToImage();
return DoRegionUnion(*this, image,
transColour.Red(),
transColour.Green(),
transColour.Blue(),
tolerance);
+#else
+ return false;
+#endif
}
#else
}
#endif
-
-//---------------------------------------------------------------------------