From 6d0d84554854a19db991ba64e7e034e1fc898ef0 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 31 Jul 2008 06:57:33 +0000 Subject: [PATCH] better guarding when no printing architecture exists (patch from Joel Low) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dcgraph.cpp | 4 ++++ src/common/graphcmn.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 96516c4e52..42742a48b9 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -69,10 +69,12 @@ wxGCDC::wxGCDC( const wxMemoryDC& dc) : { } +#if wxUSE_PRINTING_ARCHITECTURE wxGCDC::wxGCDC( const wxPrinterDC& dc) : wxDC( new wxGCDCImpl( this, dc ) ) { } +#endif wxGCDC::wxGCDC() : wxDC( new wxGCDCImpl( this ) ) @@ -136,12 +138,14 @@ wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ) : SetGraphicsContext( wxGraphicsContext::Create(dc) ); } +#if wxUSE_PRINTING_ARCHITECTURE wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ) : wxDCImpl( owner ) { Init(); SetGraphicsContext( wxGraphicsContext::Create(dc) ); } +#endif void wxGCDCImpl::Init() { diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index d3166c26dd..49a2a87967 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -800,10 +800,12 @@ wxGraphicsBitmap wxGraphicsContext::CreateSubBitmap( const wxGraphicsBitmap &bmp return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc); } +#if wxUSE_PRINTING_ARCHITECTURE /* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxPrinterDC& dc) { return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc); } +#endif wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context ) { -- 2.47.2