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
This commit is contained in:
Vadim Zeitlin
2010-10-20 23:11:04 +00:00
parent 140091e55c
commit 4d9d127f45

View File

@@ -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);