From 4d9d127f45d6c9af714da5b84081d01a2f15affe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Oct 2010 23:11:04 +0000 Subject: [PATCH] Correct the fix that broke wxRegion::ConvertToBitmap(). The changes in r64874 were incorrect and made the size of the bitmap even more wrong than before. Fix it correctly now by just adding 1 extra pixel to the size of the bitmap used in the original (pre-r64874) version. Closes #12213. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/rgncmn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/rgncmn.cpp b/src/common/rgncmn.cpp index 44305243f7..93de0d48f8 100644 --- a/src/common/rgncmn.cpp +++ b/src/common/rgncmn.cpp @@ -60,7 +60,7 @@ bool wxRegionBase::IsEqual(const wxRegion& region) const wxBitmap wxRegionBase::ConvertToBitmap() const { wxRect box = GetBox(); - wxBitmap bmp(box.GetWidth(), box.GetHeight()); + wxBitmap bmp(box.GetRight() + 1, box.GetBottom() + 1); wxMemoryDC dc; dc.SelectObject(bmp); dc.SetBackground(*wxBLACK_BRUSH); -- 2.47.2