Added wxGCDC(wxEnhMetaFileDC) ctor too.

Make it possible to create wxGCDC associated with a metafile DC in wxMSW too.

Closes #13326.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-19 22:35:41 +00:00
parent b64bb3ca1b
commit 2d770c4f82
4 changed files with 37 additions and 0 deletions

View File

@@ -114,6 +114,13 @@ wxGCDC::wxGCDC( const wxPrinterDC& dc) :
}
#endif
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
wxGCDC::wxGCDC(const wxEnhMetaFileDC& dc)
: wxDC(new wxGCDCImpl(this, dc))
{
}
#endif
wxGCDC::wxGCDC() :
wxDC( new wxGCDCImpl( this ) )
{
@@ -193,6 +200,15 @@ wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ) :
}
#endif
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
wxGCDCImpl::wxGCDCImpl(wxDC *owner, const wxEnhMetaFileDC& dc)
: wxDCImpl(owner)
{
Init();
SetGraphicsContext(wxGraphicsContext::Create(dc));
}
#endif
void wxGCDCImpl::Init()
{
m_ok = false;