X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/432efcb004c8a7f4997acab1aa044c78226c36bb..40e5ebbf98728d627e4d3c9e3a57f28f5bb8fcb9:/src/x11/dcmemory.cpp diff --git a/src/x11/dcmemory.cpp b/src/x11/dcmemory.cpp index f5a4bddb64..f2019230e0 100644 --- a/src/x11/dcmemory.cpp +++ b/src/x11/dcmemory.cpp @@ -23,8 +23,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) -wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) - : wxWindowDC() +void wxMemoryDC::Init() { m_ok = false; @@ -32,27 +31,19 @@ wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) int screen = DefaultScreen( wxGlobalDisplay() ); m_cmap = (WXColormap) DefaultColormap( wxGlobalDisplay(), screen ); - - if ( bitmap.IsOk() ) - SelectObject(bitmap); } wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) : wxWindowDC() { - m_ok = false; - - m_display = (WXDisplay *) wxGlobalDisplay(); - - int screen = DefaultScreen( wxGlobalDisplay() ); - m_cmap = (WXColormap) DefaultColormap( wxGlobalDisplay(), screen ); + Init(); } wxMemoryDC::~wxMemoryDC() { } -void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) +void wxMemoryDC::DoSelect( const wxBitmap& bitmap ) { Destroy();