- ERRORID vError;
- wxString sError;
- HDC hDC;
- HPS hPS;
- DEVOPENSTRUC vDOP = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
- SIZEL vSize = {0, 0};
+ wxCHECK_RET( pOldDC, wxT("NULL dc in wxMemoryDC ctor") );
+
+ CreateCompatible(pOldDC);
+ Init();
+} // end of wxMemoryDC::wxMemoryDC
+
+void wxMemoryDCImpl::Init()
+{
+ if (m_ok)
+ {
+ SetBrush(*wxWHITE_BRUSH);
+ SetPen(*wxBLACK_PEN);
+
+ // the background mode is only used for text background and is set in
+ // DrawText() to OPAQUE as required, otherwise always TRANSPARENT
+ ::GpiSetBackMix( GetHPS(), BM_LEAVEALONE );
+ }
+ memset(&m_vRclPaint, 0, sizeof(m_vRclPaint));
+} // end of wxMemoryDC::Init
+
+bool wxMemoryDCImpl::CreateCompatible( wxDC* WXUNUSED(pDC) )
+{
+ HDC hDC;
+ HPS hPS;
+ DEVOPENSTRUC vDOP = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
+ SIZEL vSize = {0, 0};