X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9eddec696f06d65a80e7339b2fae14fcb55f8383..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/x11/dcmemory.cpp?ds=inline diff --git a/src/x11/dcmemory.cpp b/src/x11/dcmemory.cpp index 0b2f67aad7..f5a4bddb64 100644 --- a/src/x11/dcmemory.cpp +++ b/src/x11/dcmemory.cpp @@ -23,7 +23,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) -wxMemoryDC::wxMemoryDC() : wxWindowDC() +wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) + : wxWindowDC() { m_ok = false; @@ -31,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) )