// Author: Vaclav Slavik
// Created: 2001/03/09
// RCS-ID: $Id$
-// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
+// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// constants
//-----------------------------------------------------------------------------
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
const double mm2inches = 0.0393700787402;
const double inches2mm = 25.4;
const double mm2twips = 56.6929133859;
// check if the DC is scaled or moved, and if yes, then
// convert rg to device coordinates:
if ( m_deviceOriginX != 0 || m_deviceOriginY != 0 ||
+ m_logicalOriginX != 0 || m_logicalOriginY != 0 ||
XLOG2DEVREL(500) != 500 || YLOG2DEVREL(500) != 500 )
{
region_t *mrg = rg.GetMGLRegion().rgnPointer();
{
if ( !m_penSelected )
SelectPen();
+
m_MGLDC->rect(xx + m_penOfsX, yy + m_penOfsY,
xx + ww + m_penOfsX, yy + hh + m_penOfsY);
}
if ( palette == wxNullPalette )
{
- SetPalette(m_oldPalette);
+ if ( m_oldPalette.Ok() )
+ SetPalette(m_oldPalette);
return;
}