/////////////////////////////////////////////////////////////////////////////
-// Name: dcmemory.cpp
+// Name: src/mac/classic/dcmemory.cpp
// Purpose: wxMemoryDC class
// Author: Stefan Csomor
// Modified by:
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "dcmemory.h"
-#endif
+#include "wx/wxprec.h"
#include "wx/dcmemory.h"
+
#include "wx/mac/private.h"
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
-wxMemoryDC::wxMemoryDC(void)
-: m_selected()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
+ : m_selected()
{
- m_ok = TRUE;
+ m_ok = true;
SetBackground(*wxWHITE_BRUSH);
SetBrush(*wxWHITE_BRUSH);
SetPen(*wxBLACK_PEN);
- m_ok = FALSE;
+ m_ok = false;
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
};
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
-: m_selected()
+ : m_selected()
{
- m_ok = TRUE;
+ m_ok = true;
SetBackground(*wxWHITE_BRUSH);
SetBrush(*wxWHITE_BRUSH);
SetPen(*wxBLACK_PEN);
- m_ok = FALSE;
+ m_ok = false;
};
wxMemoryDC::~wxMemoryDC()
}
SetRectRgn( (RgnHandle) m_macBoundaryClipRgn , 0 , 0 , m_selected.GetWidth() , m_selected.GetHeight() ) ;
CopyRgn( (RgnHandle) m_macBoundaryClipRgn ,(RgnHandle) m_macCurrentClipRgn ) ;
- m_ok = TRUE ;
+ m_ok = true ;
}
else
{
- m_ok = FALSE;
+ m_ok = false;
}
}
else
{
- m_ok = FALSE;
+ m_ok = false;
}
}
if (height) (*height) = 0;
}
}
-
-