+}
+
+
+bool wxRegion::Union(const wxBitmap& bmp)
+{
+#if (!defined(__WXMSW__) || wxUSE_WXDIB)
+ if (bmp.GetMask())
+ {
+ wxImage image = bmp.ConvertToImage();
+ wxASSERT_MSG( image.HasMask(), _T("wxBitmap::ConvertToImage doesn't preserve mask?") );
+ return DoRegionUnion(*this, image,
+ image.GetMaskRed(),
+ image.GetMaskGreen(),
+ image.GetMaskBlue(),
+ 0);
+ }
+ else
+#endif
+ {
+ return Union(0, 0, bmp.GetWidth(), bmp.GetHeight());
+ }
+}
+
+bool wxRegion::Union(const wxBitmap& bmp,
+ 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);