axis orientation must not be taken into account for conversion of a distance
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1529,8 +1529,8 @@ void wxDC::SetMapMode(int mode)
|
|||||||
::SetMapMode(GetHdc(), MM_ANISOTROPIC);
|
::SetMapMode(GetHdc(), MM_ANISOTROPIC);
|
||||||
|
|
||||||
SetViewportExtEx(GetHdc(), VIEWPORT_EXTENT, VIEWPORT_EXTENT, NULL);
|
SetViewportExtEx(GetHdc(), VIEWPORT_EXTENT, VIEWPORT_EXTENT, NULL);
|
||||||
m_windowExtX = (int)MS_XDEV2LOGREL(VIEWPORT_EXTENT);
|
m_windowExtX = (int)MS_XDEV2LOG(VIEWPORT_EXTENT);
|
||||||
m_windowExtY = (int)MS_YDEV2LOGREL(VIEWPORT_EXTENT);
|
m_windowExtY = (int)MS_YDEV2LOG(VIEWPORT_EXTENT);
|
||||||
::SetWindowExtEx(GetHdc(), m_windowExtX, m_windowExtY, NULL);
|
::SetWindowExtEx(GetHdc(), m_windowExtX, m_windowExtY, NULL);
|
||||||
::SetViewportOrgEx(GetHdc(), (int)m_deviceOriginX, (int)m_deviceOriginY, NULL);
|
::SetViewportOrgEx(GetHdc(), (int)m_deviceOriginX, (int)m_deviceOriginY, NULL);
|
||||||
::SetWindowOrgEx(GetHdc(), (int)m_logicalOriginX, (int)m_logicalOriginY, NULL);
|
::SetWindowOrgEx(GetHdc(), (int)m_logicalOriginX, (int)m_logicalOriginY, NULL);
|
||||||
@@ -1609,7 +1609,8 @@ wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
|
|||||||
|
|
||||||
wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
|
wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
|
||||||
{
|
{
|
||||||
return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX));
|
// axis orientation is not taken into account for conversion of a distance
|
||||||
|
return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_scaleX));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
|
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
|
||||||
@@ -1621,7 +1622,8 @@ wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
|
|||||||
|
|
||||||
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
|
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
|
||||||
{
|
{
|
||||||
return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY));
|
// axis orientation is not taken into account for conversion of a distance
|
||||||
|
return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_scaleY));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
|
wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
|
||||||
@@ -1631,7 +1633,8 @@ wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
|
|||||||
|
|
||||||
wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
|
wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
|
||||||
{
|
{
|
||||||
return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX);
|
// axis orientation is not taken into account for conversion of a distance
|
||||||
|
return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_scaleX);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
|
wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
|
||||||
@@ -1641,7 +1644,8 @@ wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
|
|||||||
|
|
||||||
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
|
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
|
||||||
{
|
{
|
||||||
return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY);
|
// axis orientation is not taken into account for conversion of a distance
|
||||||
|
return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_scaleY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -1808,8 +1808,8 @@ void wxDC::SetMapMode(
|
|||||||
ulOptions = PU_ARBITRARY | GPIF_DEFAULT;
|
ulOptions = PU_ARBITRARY | GPIF_DEFAULT;
|
||||||
::GpiSetPS(m_hPS, &vSize, ulOptions);
|
::GpiSetPS(m_hPS, &vSize, ulOptions);
|
||||||
}
|
}
|
||||||
m_nWindowExtX = (int)MS_XDEV2LOGREL(VIEWPORT_EXTENT);
|
m_nWindowExtX = (int)MS_XDEV2LOG(VIEWPORT_EXTENT);
|
||||||
m_nWindowExtY = (int)MS_YDEV2LOGREL(VIEWPORT_EXTENT);
|
m_nWindowExtY = (int)MS_YDEV2LOG(VIEWPORT_EXTENT);
|
||||||
// ????
|
// ????
|
||||||
}; // end of wxDC::SetMapMode
|
}; // end of wxDC::SetMapMode
|
||||||
|
|
||||||
@@ -1897,7 +1897,8 @@ wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
|
|||||||
|
|
||||||
wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
|
wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
|
||||||
{
|
{
|
||||||
return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_signX*m_scaleX));
|
// axis orientation is not taken into account for conversion of a distance
|
||||||
|
return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_scaleX));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
|
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
|
||||||
@@ -1907,7 +1908,8 @@ wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
|
|||||||
|
|
||||||
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
|
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
|
||||||
{
|
{
|
||||||
return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY));
|
// axis orientation is not taken into account for conversion of a distance
|
||||||
|
return (wxCoord) ((y)/(m_logicalScaleY*m_userScaleY*m_scaleY));
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
|
wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
|
||||||
@@ -1917,7 +1919,8 @@ wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
|
|||||||
|
|
||||||
wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
|
wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
|
||||||
{
|
{
|
||||||
return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX);
|
// axis orientation is not taken into account for conversion of a distance
|
||||||
|
return (wxCoord) (x*m_logicalScaleX*m_userScaleX*m_scaleX);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
|
wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
|
||||||
@@ -1927,7 +1930,8 @@ wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
|
|||||||
|
|
||||||
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
|
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
|
||||||
{
|
{
|
||||||
return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY);
|
// axis orientation is not taken into account for conversion of a distance
|
||||||
|
return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_scaleY);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user