X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/514fd350e8b074ad13960adc1b51e4a6058c539d..80a779275ae04443c568dca919adb26cf6f5002c:/src/mac/carbon/dcmemory.cpp diff --git a/src/mac/carbon/dcmemory.cpp b/src/mac/carbon/dcmemory.cpp index 8985e4edc4..ee44e18330 100644 --- a/src/mac/carbon/dcmemory.cpp +++ b/src/mac/carbon/dcmemory.cpp @@ -21,7 +21,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) -wxMemoryDC::wxMemoryDC() +wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap ) : m_selected() { m_ok = true; @@ -30,6 +30,9 @@ wxMemoryDC::wxMemoryDC() SetPen(*wxBLACK_PEN); SetFont(*wxNORMAL_FONT); m_ok = false; + + if ( bitmap.IsOk() ) + SelectObject(bitmap); } wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) @@ -105,6 +108,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) m_graphicContext = new wxMacCGContext( bmCtx ) ; m_graphicContext->SetPen( m_pen ) ; m_graphicContext->SetBrush( m_brush ) ; + m_graphicContext->SetFont( m_font ) ; } m_ok = (m_graphicContext != NULL) ;