X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cc7d13a08ae3ebf253c1543f45a3bfdd64ffe80..29a96d3c098cefe7cb388ee914b8e496d7970406:/src/common/dcgraph.cpp diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 14584924ba..48b92bda0d 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -30,8 +30,8 @@ #include "wx/dcclient.h" -#ifdef __WXMAC__ -#include "wx/mac/private.h" +#ifdef __WXOSX__ + #include "ApplicationServices/ApplicationServices.h" #endif //----------------------------------------------------------------------------- @@ -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; @@ -197,7 +209,7 @@ void wxGCDCImpl::EndPage() void wxGCDCImpl::Flush() { -#ifdef __WXMAC__ +#ifdef __WXOSX__ CGContextFlush( (CGContextRef) m_graphicContext->GetNativeContext() ); #endif }