Since CE cannot do the logical/device origin calculations

we do it ourselves as per the X11 ports.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2004-04-17 16:46:58 +00:00
parent 28c191aa0f
commit 1a4b50d2f1

View File

@@ -113,13 +113,17 @@ static const int MM_METRIC = 10;
coordinates used. coordinates used.
*/ */
// logical to device #ifdef __WXWINCE__
#define XLOG2DEV(x) (x) #define XLOG2DEV(x) ((x-m_logicalOriginX)*m_signX+m_deviceOriginX)
#define YLOG2DEV(y) (y) #define YLOG2DEV(y) ((y-m_logicalOriginY)*m_signY+m_deviceOriginY)
#define XDEV2LOG(x) ((x-m_deviceOriginX)*m_signX+m_logicalOriginX)
// device to logical #define YDEV2LOG(y) ((y-m_deviceOriginY)*m_signY+m_logicalOriginY)
#define XDEV2LOG(x) (x) #else
#define YDEV2LOG(y) (y) #define XLOG2DEV(x) (x)
#define YLOG2DEV(y) (y)
#define XDEV2LOG(x) (x)
#define YDEV2LOG(y) (y)
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// private functions // private functions
@@ -1776,13 +1780,13 @@ void wxDC::SetSystemScale(double x, double y)
{ {
WXMICROWIN_CHECK_HDC WXMICROWIN_CHECK_HDC
#ifndef __WXWINCE__
if ( x == m_scaleX && y == m_scaleY ) if ( x == m_scaleX && y == m_scaleY )
return; return;
m_scaleX = x; m_scaleX = x;
m_scaleY = y; m_scaleY = y;
#ifndef __WXWINCE__
SetMapMode(m_mappingMode); SetMapMode(m_mappingMode);
#endif #endif
} }
@@ -1791,13 +1795,13 @@ void wxDC::SetLogicalOrigin(wxCoord x, wxCoord y)
{ {
WXMICROWIN_CHECK_HDC WXMICROWIN_CHECK_HDC
#ifndef __WXWINCE__
if ( x == m_logicalOriginX && y == m_logicalOriginY ) if ( x == m_logicalOriginX && y == m_logicalOriginY )
return; return;
m_logicalOriginX = x; m_logicalOriginX = x;
m_logicalOriginY = y; m_logicalOriginY = y;
#ifndef __WXWINCE__
::SetWindowOrgEx(GetHdc(), (int)m_logicalOriginX, (int)m_logicalOriginY, NULL); ::SetWindowOrgEx(GetHdc(), (int)m_logicalOriginX, (int)m_logicalOriginY, NULL);
#endif #endif
} }
@@ -1806,13 +1810,13 @@ void wxDC::SetDeviceOrigin(wxCoord x, wxCoord y)
{ {
WXMICROWIN_CHECK_HDC WXMICROWIN_CHECK_HDC
#ifndef __WXWINCE__
if ( x == m_deviceOriginX && y == m_deviceOriginY ) if ( x == m_deviceOriginX && y == m_deviceOriginY )
return; return;
m_deviceOriginX = x; m_deviceOriginX = x;
m_deviceOriginY = y; m_deviceOriginY = y;
#ifndef __WXWINCE__
::SetViewportOrgEx(GetHdc(), (int)m_deviceOriginX, (int)m_deviceOriginY, NULL); ::SetViewportOrgEx(GetHdc(), (int)m_deviceOriginX, (int)m_deviceOriginY, NULL);
#endif #endif
} }