From b25c34aae4f8ef394efc04eed23163e8b4837bf4 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 30 Apr 2008 09:26:02 +0000 Subject: [PATCH] Added constructor to wxGCDC from wxPrinterDC git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dcgraph.h | 2 ++ src/common/dcgraph.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/wx/dcgraph.h b/include/wx/dcgraph.h index 5de63597c0..820c6780c7 100644 --- a/include/wx/dcgraph.h +++ b/include/wx/dcgraph.h @@ -26,6 +26,7 @@ class WXDLLIMPEXP_CORE wxGCDC: public wxDC public: wxGCDC( const wxWindowDC& dc ); wxGCDC( const wxMemoryDC& dc ); + wxGCDC( const wxPrinterDC& dc ); wxGCDC(); virtual ~wxGCDC(); @@ -42,6 +43,7 @@ class WXDLLIMPEXP_CORE wxGCDCImpl: public wxDCImpl public: wxGCDCImpl( wxDC *owner, const wxWindowDC& dc ); wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ); + wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ); wxGCDCImpl( wxDC *owner ); virtual ~wxGCDCImpl(); diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 6c4e534530..48b92bda0d 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -65,6 +65,11 @@ wxGCDC::wxGCDC( const wxMemoryDC& dc) : { } +wxGCDC::wxGCDC( const wxPrinterDC& dc) : + wxDC( new wxGCDCImpl( this, dc ) ) +{ +} + wxGCDC::wxGCDC() : wxDC( new wxGCDCImpl( this ) ) { @@ -127,6 +132,13 @@ wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ) : SetGraphicsContext( wxGraphicsContext::Create(dc) ); } +wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ) : + wxDCImpl( owner ) +{ + Init(); + SetGraphicsContext( wxGraphicsContext::Create(dc) ); +} + void wxGCDCImpl::Init() { m_ok = false; -- 2.45.2