X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dec57adfdb2469b7679930092f0bd9c8569d62c..4e89ceb11ee28f55050dfc03c69e72cd84f98cdf:/src/mac/carbon/dcmemory.cpp?ds=sidebyside diff --git a/src/mac/carbon/dcmemory.cpp b/src/mac/carbon/dcmemory.cpp index 85f1af33c5..9985a00b9e 100644 --- a/src/mac/carbon/dcmemory.cpp +++ b/src/mac/carbon/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