]> git.saurik.com Git - wxWidgets.git/commitdiff
Added constructor to wxGCDC from wxPrinterDC
authorRobert Roebling <robert@roebling.de>
Wed, 30 Apr 2008 09:26:02 +0000 (09:26 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 30 Apr 2008 09:26:02 +0000 (09:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dcgraph.h
src/common/dcgraph.cpp

index 5de63597c0738f89aa5ccadad3e1b2d89d0713c7..820c6780c75d59f207f44efd9f6e01b966625b8c 100644 (file)
@@ -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();
index 6c4e5345305292a733900e2e6168d33af3eb2115..48b92bda0df591530ca15bf5c768ff12c8ad93b6 100644 (file)
@@ -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;