Fix wxGCDC::Clear() for Cairo, and possibly MSW.
Maximum positive coordinate Cairo can handle is 2^23 - 1. Also convert coordinates to logical so it works right with modified origin or scale. See #14529 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,8 +38,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <limits.h> // for INT_MAX
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -1060,7 +1058,10 @@ void wxGCDCImpl::Clear(void)
|
|||||||
m_graphicContext->SetPen( p );
|
m_graphicContext->SetPen( p );
|
||||||
wxCompositionMode formerMode = m_graphicContext->GetCompositionMode();
|
wxCompositionMode formerMode = m_graphicContext->GetCompositionMode();
|
||||||
m_graphicContext->SetCompositionMode(wxCOMPOSITION_SOURCE);
|
m_graphicContext->SetCompositionMode(wxCOMPOSITION_SOURCE);
|
||||||
DoDrawRectangle( 0, 0, INT_MAX , INT_MAX );
|
// maximum positive coordinate Cairo can handle is 2^23 - 1
|
||||||
|
DoDrawRectangle(
|
||||||
|
DeviceToLogicalX(0), DeviceToLogicalY(0),
|
||||||
|
DeviceToLogicalXRel(0x007fffff), DeviceToLogicalYRel(0x007fffff));
|
||||||
m_graphicContext->SetCompositionMode(formerMode);
|
m_graphicContext->SetCompositionMode(formerMode);
|
||||||
m_graphicContext->SetPen( m_pen );
|
m_graphicContext->SetPen( m_pen );
|
||||||
m_graphicContext->SetBrush( m_brush );
|
m_graphicContext->SetBrush( m_brush );
|
||||||
|
Reference in New Issue
Block a user