X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac50e6949a01a9944c170f35f41bfb631ce8bbd1..f096a6fdfc9653196b72935d71b93867fd2d5f33:/src/osx/carbon/dcscreen.cpp diff --git a/src/osx/carbon/dcscreen.cpp b/src/osx/carbon/dcscreen.cpp index 306ea3e7f2..5622d557a7 100644 --- a/src/osx/carbon/dcscreen.cpp +++ b/src/osx/carbon/dcscreen.cpp @@ -31,8 +31,8 @@ wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) : wxWindowDCImpl( owner ) { #if wxOSX_USE_COCOA_OR_IPHONE - m_graphicContext = NULL; - m_ok = false ; + SetGraphicsContext( wxGraphicsContext::Create() ); + m_ok = true ; #else CGRect cgbounds ; cgbounds = CGDisplayBounds(CGMainDisplayID()); @@ -61,6 +61,8 @@ wxScreenDCImpl::~wxScreenDCImpl() #endif } +// TODO Switch to CGWindowListCreateImage for 10.5 and above + wxBitmap wxScreenDCImpl::DoGetAsBitmap(const wxRect *subrect) const { CGRect srcRect = CGRectMake(0, 0, m_width, m_height);