Added wxGraphicsContext::Create(const wxEnhMetaFileDC& dc) so that wxPrintPreview can work with wxMSW's wxGraphicsContext (closes #12028)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -230,6 +230,12 @@ void MyApp::Draw(wxDC&dc)
|
||||
if (window_dc)
|
||||
gc = wxGraphicsContext::Create( *window_dc );
|
||||
|
||||
#ifdef __WXMSW__
|
||||
wxEnhMetaFileDC *emf_dc = wxDynamicCast( &dc, wxEnhMetaFileDC );
|
||||
if (emf_dc)
|
||||
gc = wxGraphicsContext::Create( *emf_dc );
|
||||
#endif
|
||||
|
||||
if (gc)
|
||||
{
|
||||
// make a path that contains a circle and some lines, centered at 100,100
|
||||
|
Reference in New Issue
Block a user