better guarding when no printing architecture exists

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2008-07-31 06:59:10 +00:00
parent 6d0d845548
commit 9535b4790b

View File

@ -2356,7 +2356,9 @@ public :
virtual wxGraphicsContext * CreateContext( const wxWindowDC& dc);
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
#if wxUSE_PRINTING_ARCHITECTURE
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc);
#endif
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
@ -2453,9 +2455,9 @@ wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContext( const wxMemoryDC&
return NULL;
}
#if wxUSE_PRINTING_ARCHITECTURE
wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContext( const wxPrinterDC& dc )
{
#if wxUSE_PRINTING_ARCHITECTURE
#ifdef __WXMAC__
const wxDCImpl* impl = dc.GetImpl();
wxPrinterDCImpl *print_impl = wxDynamicCast( impl, wxPrinterDCImpl );
@ -2466,10 +2468,10 @@ wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContext( const wxPrinterDC&
return new wxMacCoreGraphicsContext( this,
(CGContextRef)(print_impl->GetGraphicsContext()->GetNativeContext()), (wxDouble) w, (wxDouble) h );
}
#endif
#endif
return NULL;
}
#endif
wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContextFromNativeContext( void * context )
{