X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b44ffc0e77a8db603b3aba597e4c4df2e2e518f..33820d94285c0004acce756e7d10d9698e6387d1:/src/msw/dcmemory.cpp diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 7da1ce87c5..c84983ad85 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -32,10 +32,6 @@ #include "wx/log.h" #endif -#if wxUSE_GRAPHICS_CONTEXT -#include "wx/graphics.h" -#endif - #include "wx/msw/private.h" // ---------------------------------------------------------------------------- @@ -44,25 +40,25 @@ IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxMSWDCImpl) -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) : wxMSWDCImpl( owner ) { - CreateCompatible(NULL); - Init(); + CreateCompatible(NULL); + Init(); } -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ) - : wxMSWDCImpl( owner ) -{ - CreateCompatible(NULL); - Init(); +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ) + : wxMSWDCImpl( owner ) +{ + CreateCompatible(NULL); + Init(); DoSelect(bitmap); } wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ) - : wxMSWDCImpl( owner ) + : wxMSWDCImpl( owner ) { - wxCHECK_RET( dc, _T("NULL dc in wxMemoryDC ctor") ); + wxCHECK_RET( dc, wxT("NULL dc in wxMemoryDC ctor") ); CreateCompatible(dc); @@ -82,14 +78,6 @@ void wxMemoryDCImpl::Init() } } -#if wxUSE_GRAPHICS_CONTEXT -wxGraphicsContext* wxMemoryDCImpl::CreateGraphicsContext() -{ - wxMemoryDC *memdc = (wxMemoryDC*) GetOwner(); - return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext( *memdc ); -} -#endif - bool wxMemoryDCImpl::CreateCompatible(wxDC *dc) { wxDCImpl *impl = dc ? dc->GetImpl() : NULL ; @@ -118,9 +106,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) ::SelectObject(GetHdc(), (HBITMAP) m_oldBitmap); if ( m_selectedBitmap.Ok() ) { -#ifdef __WXDEBUG__ m_selectedBitmap.SetSelectedInto(NULL); -#endif m_selectedBitmap = wxNullBitmap; } } @@ -135,9 +121,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) if ( !hBmp ) return; -#ifdef __WXDEBUG__ m_selectedBitmap.SetSelectedInto(GetOwner()); -#endif hBmp = (WXHBITMAP)::SelectObject(GetHdc(), (HBITMAP)hBmp); if ( !hBmp )