wxWindowDC::wxWindowDC()
{
m_window = NULL ;
+#if wxMAC_USE_CORE_GRAPHICS
m_release = false;
+#endif
}
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 ;
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;