X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dec57adfdb2469b7679930092f0bd9c8569d62c..6d6da89ccb7a6aae5cfefe66147a7055ab0854d6:/src/mac/dcmemory.cpp diff --git a/src/mac/dcmemory.cpp b/src/mac/dcmemory.cpp index 85f1af33c5..5e3f603ce8 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 @@ -22,6 +23,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC) wxMemoryDC::wxMemoryDC(void) + : m_selected() { m_ok = TRUE; SetBackground(*wxWHITE_BRUSH); @@ -31,8 +33,9 @@ wxMemoryDC::wxMemoryDC(void) }; wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) ) + : m_selected() { - m_ok = TRUE; + m_ok = TRUE; SetBackground(*wxWHITE_BRUSH); SetBrush(*wxWHITE_BRUSH); SetPen(*wxBLACK_PEN); @@ -43,7 +46,7 @@ wxMemoryDC::~wxMemoryDC() { if ( m_selected.Ok() ) { - UnlockPixels( GetGWorldPixMap(m_selected.GetHBITMAP()) ); + UnlockPixels( GetGWorldPixMap(MAC_WXHBITMAP(m_selected.GetHBITMAP())) ); } }; @@ -51,7 +54,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 +68,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