X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dec57adfdb2469b7679930092f0bd9c8569d62c..4e5a4c69c540b430fba8efe5dae1bc1ffd5caeca:/src/mac/dcmemory.cpp diff --git a/src/mac/dcmemory.cpp b/src/mac/dcmemory.cpp index 85f1af33c5..9985a00b9e 100644 --- a/src/mac/dcmemory.cpp +++ b/src/mac/dcmemory.cpp @@ -14,6 +14,7 @@ #endif #include "wx/dcmemory.h" +#include "wx/mac/private.h" //----------------------------------------------------------------------------- // wxMemoryDC @@ -43,7 +44,7 @@ wxMemoryDC::~wxMemoryDC() { if ( m_selected.Ok() ) { - UnlockPixels( GetGWorldPixMap(m_selected.GetHBITMAP()) ); + UnlockPixels( GetGWorldPixMap(MAC_WXHBITMAP(m_selected.GetHBITMAP())) ); } }; @@ -51,7 +52,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) { if ( m_selected.Ok() ) { - UnlockPixels( GetGWorldPixMap(m_selected.GetHBITMAP()) ); + UnlockPixels( GetGWorldPixMap(MAC_WXHBITMAP(m_selected.GetHBITMAP())) ); } m_selected = bitmap; if (m_selected.Ok()) @@ -65,6 +66,8 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) { m_macMask = mask->GetMaskBitmap() ; } + SetRectRgn( (RgnHandle) m_macBoundaryClipRgn , 0 , 0 , m_selected.GetWidth() , m_selected.GetHeight() ) ; + CopyRgn( (RgnHandle) m_macBoundaryClipRgn ,(RgnHandle) m_macCurrentClipRgn ) ; m_ok = TRUE ; } else