From ecc4f568a9e2dd566eb74b2616b4172863db5e7f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 11 Jul 2010 10:43:18 +0000 Subject: [PATCH] Correct the size of bitmap returned by wxRegion::ConvertToBitmap(). The bitmap was 1 pixel smaller than needed due to the unwarranted use of wxRect::GetRight() and GetBottom() instead of GetWidth() and GetHeight(). Closes #12213. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64874 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 bd8281850b..44305243f7 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.GetRight(), box.GetBottom()); + wxBitmap bmp(box.GetWidth(), box.GetHeight()); wxMemoryDC dc; dc.SelectObject(bmp); dc.SetBackground(*wxBLACK_BRUSH); -- 2.45.2