X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b85229d15bb4a02a2f3058718a1cf5ed99433020..cbc82a22cc4cb21fe3ca705ed5da5644cef90e3a:/src/gtk/dcmemory.cpp?ds=sidebyside diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp index b57a4b8aa8..f24a06e95e 100644 --- a/src/gtk/dcmemory.cpp +++ b/src/gtk/dcmemory.cpp @@ -21,7 +21,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) -wxMemoryDC::wxMemoryDC() : wxWindowDC() +wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) + : wxWindowDC() { m_ok = false; @@ -33,6 +34,9 @@ wxMemoryDC::wxMemoryDC() : wxWindowDC() pango_context_set_language( m_context, gtk_get_default_language() ); m_layout = pango_layout_new( m_context ); m_fontdesc = pango_font_description_copy( pango_context_get_font_description( m_context ) ); + + if ( bitmap.IsOk() ) + SelectObject(bitmap); } wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )