+
+
+bool wxRegion::Union(const wxBitmap& bmp)
+{
+ 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
+ {
+ return Union(0, 0, bmp.GetWidth(), bmp.GetHeight());
+ }
+}
+
+bool wxRegion::Union(const wxBitmap& bmp,
+ const wxColour& transColour,
+ int tolerance)
+{
+ wxImage image = bmp.ConvertToImage();
+ return DoRegionUnion(*this, image,
+ transColour.Red(),
+ transColour.Green(),
+ transColour.Blue(),
+ tolerance);
+}
+
+#else
+
+bool wxRegion::Union(const wxBitmap& WXUNUSED(bmp))
+{
+ // No wxImage support
+ return false;
+}
+
+bool wxRegion::Union(const wxBitmap& WXUNUSED(bmp),
+ const wxColour& WXUNUSED(transColour),
+ int WXUNUSED(tolerance))
+{
+ // No wxImage support
+ return false;
+}
+
+#endif