*height = m_height;
}
+#if wxOSX_USE_CARBON
wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const
{
// wxScreenDC is derived from wxWindowDC, so a screen dc will
if (!m_window)
return wxNullBitmap;
-#if wxOSX_USE_CARBON
ControlRef handle = (ControlRef) m_window->GetHandle();
if ( !handle )
return wxNullBitmap;
HIRect rect;
CGImageRef image;
CGContextRef context;
- void* data;
-
- size_t bytesPerRow;
HIViewCreateOffscreenImage( handle, 0, &rect, &image);
CGContextRestoreGState(context);
return bmp;
-#else
- return wxNullBitmap;
-#endif
}
+#endif
/*
* wxClientDCImpl
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 );