]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dcclient.cpp
use wxRenderer::GetCheckBoxSize() instead of doing wrong calculations in wxGridCellBo...
[wxWidgets.git] / src / osx / carbon / dcclient.cpp
index 9264e8b2d830fd25f595a329bc699b39341fca1e..2ade63d5ccd883b0faa1d24c3238b8fd3f6a831b 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/mac/carbon/dcclient.cpp
+// Name:        src/osx/carbon/dcclient.cpp
 // Purpose:     wxClientDCImpl class
 // Author:      Stefan Csomor
 // Modified by:
@@ -135,7 +135,6 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const
     CGContextDrawImage( context, rect, image );
 
     CGContextRestoreGState(context);
-
     return bmp;
 }
 #endif
@@ -181,6 +180,7 @@ wxPaintDCImpl::wxPaintDCImpl( wxDC *owner )
 wxPaintDCImpl::wxPaintDCImpl( wxDC *owner, wxWindow *window ) :
     wxWindowDCImpl( owner, window )
 {
+    wxASSERT_MSG( window->MacGetCGContextRef() != NULL, _T("using wxPaintDC without being in a native paint event") );
     wxPoint origin = window->GetClientAreaOrigin() ;
     m_window->GetClientSize( &m_width , &m_height);
     SetDeviceOrigin( origin.x, origin.y );