]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dcclient.cpp
No changes, just fix typos in comments in wxOSX files.
[wxWidgets.git] / src / osx / carbon / dcclient.cpp
index 0a257909e71eb0b9c7c99d9a72d68406e2d5ef86..21f3c245bdfc8dd9d543e1e411830f2b011b8e02 100644 (file)
@@ -68,7 +68,9 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window )
         if ( window->MacGetLeftBorderSize() != 0 || window->MacGetTopBorderSize() != 0 )
             CGContextTranslateCTM( cg , -window->MacGetLeftBorderSize() , -window->MacGetTopBorderSize() );
 
-        SetGraphicsContext( wxGraphicsContext::CreateFromNative( cg ) );
+        wxGraphicsContext* context = wxGraphicsContext::CreateFromNative( cg );
+        context->EnableOffset(true);
+        SetGraphicsContext( context );
     }
     DoSetClippingRegion( 0 , 0 , m_width , m_height ) ;
 
@@ -161,6 +163,8 @@ wxClientDCImpl::wxClientDCImpl( wxDC *owner, wxWindow *window ) :
 
 wxClientDCImpl::~wxClientDCImpl()
 {
+    if( GetGraphicsContext() && GetGraphicsContext()->GetNativeContext() )
+        Flush();
 }
 
 /*
@@ -181,10 +185,6 @@ wxPaintDCImpl::wxPaintDCImpl( wxDC *owner, wxWindow *window ) :
     wxPoint origin = window->GetClientAreaOrigin() ;
     m_window->GetClientSize( &m_width , &m_height);
     SetDeviceOrigin( origin.x, origin.y );
-#ifdef __WXOSX_IPHONE__
-    m_graphicContext->ResetClip();
-    m_clipping = false;
-#endif
     DoSetClippingRegion( 0 , 0 , m_width , m_height ) ;
 }