X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b85229d15bb4a02a2f3058718a1cf5ed99433020..c267759c8f0d9d8954b2cc883c868b23ff1ca9ee:/src/gtk/dcmemory.cpp diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp index b57a4b8aa8..47c9a673f5 100644 --- a/src/gtk/dcmemory.cpp +++ b/src/gtk/dcmemory.cpp @@ -21,7 +21,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) -wxMemoryDC::wxMemoryDC() : wxWindowDC() +void wxMemoryDC::Init() { m_ok = false; @@ -38,14 +38,7 @@ wxMemoryDC::wxMemoryDC() : wxWindowDC() wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) : wxWindowDC() { - m_ok = false; - - m_cmap = gtk_widget_get_default_colormap(); - - m_context = gdk_pango_context_get(); - 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 ) ); + Init(); } wxMemoryDC::~wxMemoryDC() @@ -53,9 +46,10 @@ wxMemoryDC::~wxMemoryDC() g_object_unref(m_context); } -void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) +void wxMemoryDC::DoSelect( const wxBitmap& bitmap ) { Destroy(); + m_selected = bitmap; if (m_selected.Ok()) {