X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..af7e24c33e1e6e00a7687ee965b921dbe60cdb36:/src/common/dcgraph.cpp diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 8de2da6817..ee399d4907 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -172,7 +172,15 @@ wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ) : wxDCImpl( owner ) { Init(); - SetGraphicsContext( wxGraphicsContext::Create(dc) ); + wxGraphicsContext* context; +#if wxUSE_CAIRO + wxGraphicsRenderer* renderer = wxGraphicsRenderer::GetCairoRenderer(); + context = renderer->CreateContext(dc); +#else + context = wxGraphicsContext::Create(dc); +#endif + + SetGraphicsContext( context ); } #if wxUSE_PRINTING_ARCHITECTURE @@ -265,9 +273,7 @@ void wxGCDCImpl::EndPage() void wxGCDCImpl::Flush() { -#ifdef __WXOSX_OR_COCOA__ - CGContextFlush( (CGContextRef) m_graphicContext->GetNativeContext() ); -#endif + m_graphicContext->Flush(); } void wxGCDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h ) @@ -450,12 +456,6 @@ void wxGCDCImpl::SetFont( const wxFont &font ) if ( f.IsOk() ) f.SetPointSize( /*LogicalToDeviceYRel*/(font.GetPointSize())); m_graphicContext->SetFont( f, m_textForegroundColour ); -#if defined(__WXGTK__) || defined(__WXOSX__) - if ( m_font.IsOk() && m_font.GetNoAntiAliasing() ) - { - m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE); - } -#endif } }