X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2bcbdfbc798cccc134c192a4a0185035cd9303c..66c59e2c54cd688d17a4bbed00050defe7ed12c7:/src/motif/dc.cpp?ds=sidebyside diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp index f4d0e3f56d..939442bd32 100644 --- a/src/motif/dc.cpp +++ b/src/motif/dc.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dc.cpp +// Name: src/motif/dc.cpp // Purpose: wxDC class // Author: Julian Smart // Modified by: @@ -9,18 +9,16 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "dc.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #include "wx/dc.h" -#include "wx/dcmemory.h" -#include "wx/defs.h" - IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) +#ifndef WX_PRECOMP + #include "wx/dcmemory.h" +#endif + +IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) //----------------------------------------------------------------------------- // wxDC @@ -28,14 +26,14 @@ wxDC::wxDC() { - m_ok = FALSE; + m_ok = false; m_mm_to_pix_x = 1.0; m_mm_to_pix_y = 1.0; m_backgroundMode = wxTRANSPARENT; - m_isInteractive = FALSE; + m_isInteractive = false; } void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y) @@ -43,7 +41,7 @@ void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y) wxCHECK_RET( Ok(), "invalid dc" ); wxCHECK_RET( icon.Ok(), "invalid icon" ); - DoDrawBitmap(icon, x, y, TRUE); + DoDrawBitmap(icon, x, y, true); } void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask ) @@ -51,7 +49,7 @@ void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useM wxCHECK_RET( bitmap.Ok(), "invalid bitmap" ); wxMemoryDC memDC; - memDC.SelectObject(bitmap); + memDC.SelectObjectAsSource(bitmap); #if 0 // Not sure if we need this. The mask should leave the masked areas as per @@ -72,7 +70,7 @@ void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useM void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) { - m_clipping = TRUE; + m_clipping = true; m_clipX1 = x; m_clipY1 = y; m_clipX2 = x + width; @@ -128,8 +126,8 @@ void wxDC::SetMapMode( int mode ) } if (mode != wxMM_TEXT) { - m_needComputeScaleX = TRUE; - m_needComputeScaleY = TRUE; + m_needComputeScaleX = true; + m_needComputeScaleY = true; } } @@ -216,4 +214,3 @@ void wxDC::ComputeScaleAndOrigin() m_scaleX = m_logicalScaleX * m_userScaleX; m_scaleY = m_logicalScaleY * m_userScaleY; } -