#if wxUSE_GRAPHICS_CONTEXT
-#include "wx/graphics.h"
#include "wx/dcgraph.h"
#ifndef WX_PRECOMP
#include "wx/icon.h"
- #include "wx/bitmap.h"
+ #include "wx/dcclient.h"
#include "wx/dcmemory.h"
- #include "wx/region.h"
#endif
-#include "wx/dcclient.h"
-
-#ifdef __WXOSX_OR_COCOA__
-#ifdef __WXOSX_IPHONE__
- #include <CoreGraphics/CoreGraphics.h>
-#else
- #include <ApplicationServices/ApplicationServices.h>
-#endif
-#endif
-
-#include <limits.h> // for INT_MAX
-
//-----------------------------------------------------------------------------
// constants
//-----------------------------------------------------------------------------
m_graphicContext->SetPen( p );
wxCompositionMode formerMode = m_graphicContext->GetCompositionMode();
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->SetPen( m_pen );
m_graphicContext->SetBrush( m_brush );