X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b5bf72fbe427ed63e577a258483505f1a56929d..ac6e0eb1547cfc47ca72e6a293e28ca0f93f2981:/src/mac/carbon/dcclient.cpp diff --git a/src/mac/carbon/dcclient.cpp b/src/mac/carbon/dcclient.cpp index 1cfe5dcb30..27164c2c9e 100644 --- a/src/mac/carbon/dcclient.cpp +++ b/src/mac/carbon/dcclient.cpp @@ -145,8 +145,6 @@ wxWindowDC::wxWindowDC(wxWindow *window) SetGraphicsContext( wxGraphicsContext::CreateFromNative( cg ) ); } - m_graphicContext->SetPen( m_pen ) ; - m_graphicContext->SetBrush( m_brush ) ; SetClippingRegion( 0 , 0 , m_width , m_height ) ; #else int x , y ; @@ -193,6 +191,11 @@ void wxWindowDC::DoGetSize( int* width, int* height ) const wxBitmap wxWindowDC::DoGetAsBitmap(const wxRect *subrect) const { + // wxScreenDC is derived from wxWindowDC, so a screen dc will + // call this method when a Blit is performed with it as a source. + if (!m_window) + return wxNullBitmap; + ControlRef handle = (ControlRef) m_window->GetHandle(); if ( !handle ) return wxNullBitmap;