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); }
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); #else return false; #endif }
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()); } }