]> git.saurik.com Git - wxWidgets.git/commitdiff
Adapt for new DC code
authorRobert Roebling <robert@roebling.de>
Mon, 12 Nov 2007 19:03:37 +0000 (19:03 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 12 Nov 2007 19:03:37 +0000 (19:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/graphicc.cpp

index 2f29da4b3cf30774736237954290a97616a86a55..df232c1db3828a5b6a12f96269b90f570d85f922 100644 (file)
@@ -1036,8 +1036,13 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC&
 : wxGraphicsContext(renderer)
 {
 #ifdef __WXGTK__
 : wxGraphicsContext(renderer)
 {
 #ifdef __WXGTK__
+#if wxUSE_NEW_DC
+    wxGTKImplDC *impldc = (wxGTKImplDC*) dc.GetImpl();
+    Init( gdk_cairo_create( impldc->GetGDKWindow() ) );
+#else  
     Init( gdk_cairo_create( dc.m_window ) );
 #endif
     Init( gdk_cairo_create( dc.m_window ) );
 #endif
+#endif
 #ifdef __WXMAC__
     int width, height;
     dc.GetSize( &width, &height );
 #ifdef __WXMAC__
     int width, height;
     dc.GetSize( &width, &height );