X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..b404a8f3b072129c107c6d9a5e0f6f53cd34807b:/src/mgl/dcmemory.cpp diff --git a/src/mgl/dcmemory.cpp b/src/mgl/dcmemory.cpp index 01123359ca..a5a61a33f6 100644 --- a/src/mgl/dcmemory.cpp +++ b/src/mgl/dcmemory.cpp @@ -1,17 +1,13 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dcmemory.cpp +// Name: src/mgl/dcmemory.cpp // Purpose: // Author: Robert Roebling, Vaclav Slavik // RCS-ID: $Id$ -// Copyright: (c) 1998 Robert Roebling, +// Copyright: (c) 1998 Robert Roebling, // 2001 SciTech Software, Inc. (www.scitechsoft.com) -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "dcmemory.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -28,23 +24,23 @@ 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) { - if ( bitmap.Ok() ) + if ( bitmap.IsOk() ) { m_selected = bitmap; SetMGLDC(m_selected.CreateTmpDC(), TRUE); @@ -53,7 +49,7 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap) void wxMemoryDC::SetPen(const wxPen &pen) { - wxCHECK_RET( Ok(), wxT("invalid dc") ); + wxCHECK_RET( IsOk(), wxT("invalid dc") ); if ( GetDepth() == 1 && *wxTRANSPARENT_PEN != pen ) { @@ -70,7 +66,7 @@ void wxMemoryDC::SetPen(const wxPen &pen) void wxMemoryDC::SetBrush(const wxBrush &brush) { - wxCHECK_RET( Ok(), wxT("invalid dc") ); + wxCHECK_RET( IsOk(), wxT("invalid dc") ); if ( GetDepth() == 1 && *wxTRANSPARENT_BRUSH != brush ) { @@ -87,7 +83,7 @@ void wxMemoryDC::SetBrush(const wxBrush &brush) void wxMemoryDC::SetTextForeground(const wxColour &col) { - wxCHECK_RET( Ok(), wxT("invalid dc") ); + wxCHECK_RET( IsOk(), wxT("invalid dc") ); if ( GetDepth() == 1 ) { @@ -104,7 +100,7 @@ void wxMemoryDC::SetTextForeground(const wxColour &col) void wxMemoryDC::SetTextBackground(const wxColour &col) { - wxCHECK_RET( Ok(), wxT("invalid dc") ); + wxCHECK_RET( IsOk(), wxT("invalid dc") ); if ( GetDepth() == 1 ) {