]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/dcmemory.cpp
corrected warnings
[wxWidgets.git] / src / mac / dcmemory.cpp
index 85f1af33c59bb32ffb2d5b12c143b77c447884bb..5e3f603ce8c0d7ce3efd3ae1ae29b8cb3f75494b 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 
 #include "wx/dcmemory.h"
 #endif
 
 #include "wx/dcmemory.h"
+#include "wx/mac/private.h"
 
 //-----------------------------------------------------------------------------
 // wxMemoryDC
 
 //-----------------------------------------------------------------------------
 // wxMemoryDC
@@ -22,6 +23,7 @@
 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
 
 wxMemoryDC::wxMemoryDC(void)
 IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
 
 wxMemoryDC::wxMemoryDC(void)
+    : m_selected()
 {
   m_ok = TRUE;
     SetBackground(*wxWHITE_BRUSH);
 {
   m_ok = TRUE;
     SetBackground(*wxWHITE_BRUSH);
@@ -31,8 +33,9 @@ wxMemoryDC::wxMemoryDC(void)
 };
 
 wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
 };
 
 wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
+    : m_selected()
 {
 {
- m_ok = TRUE;
 m_ok = TRUE;
     SetBackground(*wxWHITE_BRUSH);
     SetBrush(*wxWHITE_BRUSH);
     SetPen(*wxBLACK_PEN);
     SetBackground(*wxWHITE_BRUSH);
     SetBrush(*wxWHITE_BRUSH);
     SetPen(*wxBLACK_PEN);
@@ -43,7 +46,7 @@ wxMemoryDC::~wxMemoryDC()
 {
        if ( m_selected.Ok() )
        {
 {
        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() )
        {
 {
        if ( m_selected.Ok() )
        {
-               UnlockPixels( GetGWorldPixMap(m_selected.GetHBITMAP()) );
+               UnlockPixels( GetGWorldPixMap(MAC_WXHBITMAP(m_selected.GetHBITMAP())) );
        }
     m_selected = bitmap;
     if (m_selected.Ok())
        }
     m_selected = bitmap;
     if (m_selected.Ok())
@@ -65,6 +68,8 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
                        {
                                m_macMask = mask->GetMaskBitmap() ;
                        }
                        {
                                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
                        m_ok = TRUE ;
                }
                else