X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c16b9bfe69f3d28738aa35edfbc2a05b7c573301..cb98e78b1e363e70d07360728c49b6dd21f36f7c:/src/common/rgncmn.cpp diff --git a/src/common/rgncmn.cpp b/src/common/rgncmn.cpp index a18bb20708..93de0d48f8 100644 --- a/src/common/rgncmn.cpp +++ b/src/common/rgncmn.cpp @@ -60,12 +60,12 @@ bool wxRegionBase::IsEqual(const wxRegion& region) const wxBitmap wxRegionBase::ConvertToBitmap() const { wxRect box = GetBox(); - wxBitmap bmp(box.GetRight(), box.GetBottom()); + wxBitmap bmp(box.GetRight() + 1, box.GetBottom() + 1); wxMemoryDC dc; dc.SelectObject(bmp); dc.SetBackground(*wxBLACK_BRUSH); dc.Clear(); - dc.SetClippingRegion(*wx_static_cast(const wxRegion *, this)); + dc.SetDeviceClippingRegion(*static_cast(this)); dc.SetBackground(*wxWHITE_BRUSH); dc.Clear(); dc.SelectObject(wxNullBitmap); @@ -131,7 +131,7 @@ bool wxRegionBase::Union(const wxBitmap& bmp) if (bmp.GetMask()) { wxImage image = bmp.ConvertToImage(); - wxASSERT_MSG( image.HasMask(), _T("wxBitmap::ConvertToImage doesn't preserve mask?") ); + wxASSERT_MSG( image.HasMask(), wxT("wxBitmap::ConvertToImage doesn't preserve mask?") ); return DoRegionUnion(*this, image, image.GetMaskRed(), image.GetMaskGreen(),