Added constructor to wxGCDC from wxPrinterDC

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-04-30 09:26:02 +00:00
parent eaeb99858d
commit b25c34aae4
2 changed files with 14 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ class WXDLLIMPEXP_CORE wxGCDC: public wxDC
public: public:
wxGCDC( const wxWindowDC& dc ); wxGCDC( const wxWindowDC& dc );
wxGCDC( const wxMemoryDC& dc ); wxGCDC( const wxMemoryDC& dc );
wxGCDC( const wxPrinterDC& dc );
wxGCDC(); wxGCDC();
virtual ~wxGCDC(); virtual ~wxGCDC();
@@ -42,6 +43,7 @@ class WXDLLIMPEXP_CORE wxGCDCImpl: public wxDCImpl
public: public:
wxGCDCImpl( wxDC *owner, const wxWindowDC& dc ); wxGCDCImpl( wxDC *owner, const wxWindowDC& dc );
wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ); wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc );
wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc );
wxGCDCImpl( wxDC *owner ); wxGCDCImpl( wxDC *owner );
virtual ~wxGCDCImpl(); virtual ~wxGCDCImpl();

View File

@@ -65,6 +65,11 @@ wxGCDC::wxGCDC( const wxMemoryDC& dc) :
{ {
} }
wxGCDC::wxGCDC( const wxPrinterDC& dc) :
wxDC( new wxGCDCImpl( this, dc ) )
{
}
wxGCDC::wxGCDC() : wxGCDC::wxGCDC() :
wxDC( new wxGCDCImpl( this ) ) wxDC( new wxGCDCImpl( this ) )
{ {
@@ -127,6 +132,13 @@ wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ) :
SetGraphicsContext( wxGraphicsContext::Create(dc) ); SetGraphicsContext( wxGraphicsContext::Create(dc) );
} }
wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ) :
wxDCImpl( owner )
{
Init();
SetGraphicsContext( wxGraphicsContext::Create(dc) );
}
void wxGCDCImpl::Init() void wxGCDCImpl::Init()
{ {
m_ok = false; m_ok = false;