From: Vadim Zeitlin Date: Mon, 2 Jul 2012 15:05:39 +0000 (+0000) Subject: Clear larger area in wxGCDC::Clear(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/12ca260575f98426427464fbf8fcfad5f1ec7b61?ds=inline Clear larger area in wxGCDC::Clear(). Clearing a rectangle of size 32000 was not always enough to clear the entire DC, so use INT_MAX instead -- this is the best we can do with the current approach. Closes #13445. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 41bbfa37c0..1f11435352 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -38,6 +38,8 @@ #endif #endif +#include // for INT_MAX + //----------------------------------------------------------------------------- // constants //----------------------------------------------------------------------------- @@ -1048,7 +1050,7 @@ void wxGCDCImpl::Clear(void) m_graphicContext->SetPen( p ); wxCompositionMode formerMode = m_graphicContext->GetCompositionMode(); m_graphicContext->SetCompositionMode(wxCOMPOSITION_SOURCE); - DoDrawRectangle( 0, 0, 32000 , 32000 ); + DoDrawRectangle( 0, 0, INT_MAX , INT_MAX ); m_graphicContext->SetCompositionMode(formerMode); m_graphicContext->SetPen( m_pen ); m_graphicContext->SetBrush( m_brush );