X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68df211faedeabdf4259858109d1bd7385fdccf5..8c36c49496660f0779584c6a318c7416c519f84d:/src/os2/dcmemory.cpp?ds=sidebyside diff --git a/src/os2/dcmemory.cpp b/src/os2/dcmemory.cpp index a786f31641..1332c9d2fb 100644 --- a/src/os2/dcmemory.cpp +++ b/src/os2/dcmemory.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/os2/dcmemory.cpp // Purpose: wxMemoryDC class // Author: David Webster // Modified by: @@ -12,28 +12,22 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/dcmemory.h" + #ifndef WX_PRECOMP -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/log.h" + #include "wx/utils.h" + #include "wx/app.h" + #include "wx/log.h" #endif #include "wx/os2/private.h" -#include "wx/dcmemory.h" - IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) ///////////////////////////////////////////////////////////////////////////// // Memory DC ///////////////////////////////////////////////////////////////////////////// -wxMemoryDC::wxMemoryDC(void) -{ - CreateCompatible(NULL); - Init(); -} // end of wxMemoryDC::wxMemoryDC - wxMemoryDC::wxMemoryDC( wxDC* pOldDC ) @@ -98,16 +92,16 @@ bool wxMemoryDC::CreateCompatible( wxDC* WXUNUSED(pDC) ) { m_hPS = NULLHANDLE; m_hDC = NULLHANDLE; - m_ok = FALSE; - m_bOwnsDC = FALSE; + m_ok = false; + m_bOwnsDC = false; } } else { m_hPS = NULLHANDLE; m_hDC = NULLHANDLE; - m_ok = FALSE; - m_bOwnsDC = FALSE; + m_ok = false; + m_bOwnsDC = false; } // @@ -118,7 +112,7 @@ bool wxMemoryDC::CreateCompatible( wxDC* WXUNUSED(pDC) ) return m_ok; } // end of wxMemoryDC::CreateCompatible -void wxMemoryDC::SelectObject( +void wxMemoryDC::DoSelect( const wxBitmap& rBitmap ) { @@ -165,6 +159,7 @@ void wxMemoryDC::SelectObject( ); m_vSelectedBitmap.SetSelectedInto(NULL); } + m_vSelectedBitmap = rBitmap;