/////////////////////////////////////////////////////////////////////////////
-// Name: dc.cpp
+// Name: src/x11/dc.cpp
// Purpose: wxDC class
// Author: Julian Smart
// Modified by:
// 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)
-//-----------------------------------------------------------------------------
-// constants
-//-----------------------------------------------------------------------------
+#ifndef WX_PRECOMP
+ #include "wx/dcmemory.h"
+#endif
-#define mm2inches 0.0393700787402
-#define inches2mm 25.4
-#define mm2twips 56.6929133859
-#define twips2mm 0.0176388888889
-#define mm2pt 2.83464566929
-#define pt2mm 0.352777777778
+IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
//-----------------------------------------------------------------------------
// wxDC
wxDC::wxDC()
{
- m_ok = FALSE;
+ m_ok = false;
#if 1
m_mm_to_pix_x = 1.0;
(double)wxGetDisplaySizeMM().GetHeight();
#endif
- m_needComputeScaleX = FALSE; /* not used yet */
- m_needComputeScaleY = FALSE; /* not used yet */
+ m_needComputeScaleX = false; /* not used yet */
+ m_needComputeScaleY = false; /* not used yet */
m_logicalFunction = wxCOPY;
m_backgroundMode = wxTRANSPARENT;
- m_isInteractive = FALSE; // ???
+ m_isInteractive = false; // ???
}
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;
m_clipY2 = y + height;
}
-void wxDC::DestroyClippingRegion()
-{
- m_clipping = FALSE;
-}
-
void wxDC::DoGetSizeMM( int* width, int* height ) const
{
int w, h;
}
if (mode != wxMM_TEXT)
{
- m_needComputeScaleX = TRUE;
- m_needComputeScaleY = TRUE;
+ m_needComputeScaleX = true;
+ m_needComputeScaleY = true;
}
}
m_scaleX = m_logicalScaleX * m_userScaleX;
m_scaleY = m_logicalScaleY * m_userScaleY;
}
-