]> git.saurik.com Git - wxWidgets.git/commitdiff
better guarding when no printing architecture exists
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 31 Jul 2008 06:59:10 +0000 (06:59 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 31 Jul 2008 06:59:10 +0000 (06:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/carbon/graphics.cpp

index 8003ae76a187a02fec1f0339206ac11c84f5d85e..07446d9a17fdc577ef78bbdf8aecd5ee17ebf213 100644 (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 )
 {