// 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"
{
unsigned char hiR, hiG, hiB;
- hiR = wxMin(0xFF, loR + tolerance);
- hiG = wxMin(0xFF, loG + tolerance);
- hiB = wxMin(0xFF, loB + tolerance);
+ hiR = (unsigned char)wxMin(0xFF, loR + tolerance);
+ hiG = (unsigned char)wxMin(0xFF, loG + tolerance);
+ hiB = (unsigned char)wxMin(0xFF, loB + tolerance);
// Loop through the image row by row, pixel by pixel, building up
// rectangles to add to the region.
return true;
}
-
+
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