X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b8ec418aee4e38877d4cb79e2984c766dcc358..bcf324bebe65cd7ee49c139533ceea52dceb4b91:/src/mgl/dcmemory.cpp diff --git a/src/mgl/dcmemory.cpp b/src/mgl/dcmemory.cpp index 8ed99b6022..d09e8080f8 100644 --- a/src/mgl/dcmemory.cpp +++ b/src/mgl/dcmemory.cpp @@ -1,16 +1,13 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/mgl/dcmemory.cpp // Purpose: // Author: Robert Roebling, Vaclav Slavik // RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, 2001 Vaclav Slavik +// Copyright: (c) 1998 Robert Roebling, +// 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "dcmemory.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -27,27 +24,27 @@ IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC) -wxMemoryDC::wxMemoryDC() : wxDC() +void wxMemoryDC::Init() { - m_isMemDC = TRUE; + m_isMemDC = true; } wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc)) : wxDC() { - m_isMemDC = TRUE; + Init(); } wxMemoryDC::~wxMemoryDC() { } -void wxMemoryDC::SelectObject(const wxBitmap& bitmap) +void wxMemoryDC::DoSelect(const wxBitmap& bitmap) { - SetMGLDC(NULL, TRUE); - m_selected = bitmap; - if ( bitmap.Ok() ) + { + m_selected = bitmap; SetMGLDC(m_selected.CreateTmpDC(), TRUE); + } } void wxMemoryDC::SetPen(const wxPen &pen)