]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dcgraph.cpp
Visually show the cells boundaries in layout sample grid sizer test.
[wxWidgets.git] / src / common / dcgraph.cpp
index 94a541d21cfe131f1b876f9df4d0c602cb5a2d1f..ee399d4907dee76ead9780cd82fd4e34ca6f53ca 100644 (file)
@@ -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 )