From fa54e1af158e2cbe5014efefddffd6c2704bb9bf Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 8 Jul 2016 22:57:27 -0700 Subject: [PATCH] Be more conservative in avoiding Cairo's maximum coordinate limit. Fixes wxGCDC::Clear(). See #17584 --- src/common/dcgraph.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 90f856609a..d42a4f4659 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -1151,9 +1151,10 @@ void wxGCDCImpl::Clear(void) wxCompositionMode formerMode = m_graphicContext->GetCompositionMode(); m_graphicContext->SetCompositionMode(wxCOMPOSITION_SOURCE); // maximum positive coordinate Cairo can handle is 2^23 - 1 + // Use a value slightly less than this to be sure we avoid the limit DoDrawRectangle( DeviceToLogicalX(0), DeviceToLogicalY(0), - DeviceToLogicalXRel(0x007fffff), DeviceToLogicalYRel(0x007fffff)); + DeviceToLogicalXRel(0x800000 - 64), DeviceToLogicalYRel(0x800000 - 64)); m_graphicContext->SetCompositionMode(formerMode); m_graphicContext->SetPen( m_pen ); m_graphicContext->SetBrush( m_brush );