X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0f93bc7dcf35f0e136cd8a5fa22ad6bdf1c2501..d5363c04ac7bfd5409b369746a67b83fd10cfdbc:/src/common/dcgraph.cpp diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 1f7295a12e..1f08538f85 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -121,6 +121,12 @@ wxGCDC::wxGCDC(const wxEnhMetaFileDC& dc) } #endif +wxGCDC::wxGCDC(wxGraphicsContext* context) : + wxDC( new wxGCDCImpl( this ) ) +{ + SetGraphicsContext(context); +} + wxGCDC::wxGCDC() : wxDC( new wxGCDCImpl( this ) ) { @@ -181,13 +187,7 @@ wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ) : { Init(); wxGraphicsContext* context; -#if wxUSE_CAIRO - wxGraphicsRenderer* renderer = wxGraphicsRenderer::GetCairoRenderer(); - context = renderer->CreateContext(dc); -#else context = wxGraphicsContext::Create(dc); -#endif - SetGraphicsContext( context ); }