]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/dcmemory.cpp
Minor header cleaning.
[wxWidgets.git] / src / x11 / dcmemory.cpp
index 810e55f83ea07d44e323eb8a1df7acc054d33184..f5a4bddb6455fe576db0706f6c38d0f6ad1677ce 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
+    #include "wx/settings.h"
 #endif
 
-#include "wx/settings.h"
-
 #include "wx/x11/private.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC)
 
-wxMemoryDC::wxMemoryDC() : wxWindowDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
+    : wxWindowDC()
 {
     m_ok = false;
 
@@ -32,6 +32,9 @@ wxMemoryDC::wxMemoryDC() : wxWindowDC()
 
     int screen = DefaultScreen( wxGlobalDisplay() );
     m_cmap = (WXColormap) DefaultColormap( wxGlobalDisplay(), screen );
+
+    if ( bitmap.IsOk() )
+        SelectObject(bitmap);
 }
 
 wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )