X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e9576ca53db96b462ed4c0b4bdf47d64c40203e4..b0230a69bcf6db9a18bbdefb0c3027c6a438ed55:/src/mac/dcmemory.cpp diff --git a/src/mac/dcmemory.cpp b/src/mac/dcmemory.cpp index 7cbd330821..fe88bf806c 100644 --- a/src/mac/dcmemory.cpp +++ b/src/mac/dcmemory.cpp @@ -40,6 +40,23 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) m_selected = bitmap; if (m_selected.Ok()) { + wxBitmapRefData * bmap = (wxBitmapRefData*) (m_selected.GetRefData()) ; + if ( bmap->m_hBitmap ) + { + m_macPort = (GrafPtr) bmap->m_hBitmap ; + wxMask * mask = bitmap.GetMask() ; + if ( mask ) + { + m_macMask = mask->GetMaskBitmap() ; + } + MacSetupPort() ; + m_ok = TRUE ; + // SetBackground(wxBrush(*wxWHITE, wxSOLID)); + } + else + { + m_ok = FALSE; + } } else {