X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/motif/dcmemory.cpp diff --git a/src/motif/dcmemory.cpp b/src/motif/dcmemory.cpp index 41eeaccfff..789dac864d 100644 --- a/src/motif/dcmemory.cpp +++ b/src/motif/dcmemory.cpp @@ -16,10 +16,9 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/settings.h" #endif -#include "wx/settings.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif @@ -36,7 +35,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxWindowDC) -wxMemoryDC::wxMemoryDC(void) +wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) { m_ok = true; m_display = wxGetDisplay(); @@ -53,11 +52,14 @@ wxMemoryDC::wxMemoryDC(void) GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode, &gcvalues); - m_backgroundPixel = (int) gcvalues.background; + m_backgroundPixel = gcvalues.background; SetBrush (* wxWHITE_BRUSH); SetPen (* wxBLACK_PEN); SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); + + if ( bitmap.IsOk() ) + SelectObject(bitmap); } wxMemoryDC::wxMemoryDC( wxDC* dc ) @@ -80,7 +82,7 @@ wxMemoryDC::wxMemoryDC( wxDC* dc ) GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode, &gcvalues); - m_backgroundPixel = (int) gcvalues.background; + m_backgroundPixel = gcvalues.background; SetBrush (* wxWHITE_BRUSH); SetPen (* wxBLACK_PEN); @@ -113,7 +115,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode, &gcvalues); - m_backgroundPixel = (int) gcvalues.background; + m_backgroundPixel = gcvalues.background; m_ok = true; SetBrush (* wxWHITE_BRUSH); @@ -139,5 +141,3 @@ void wxMemoryDC::DoGetSize( int *width, int *height ) const if (height) (*height) = 0; }; } - -