Made device to logical and vv conversion methods

virtual and implement them like any other method
    in the wxDC classes, not only in the their files
    but somehow belonging to the wxDCBase class.
  This is required for plugging in differnt DC backends
    with different conversions.
  Ideally (and absolutely possible ) all these methods
    should be removed and just the one in wxDCBase
    should stay using values set in the various
    derived classes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-05-01 21:28:29 +00:00
parent df08bf5ab3
commit 621b83d9b3
18 changed files with 410 additions and 512 deletions

View File

@@ -2380,34 +2380,34 @@ wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
return (wxCoord) ((x)/(m_logicalScaleX*m_userScaleX*m_scaleX));
}
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
wxCoord wxDC::DeviceToLogicalY(wxCoord y) const
{
return (wxCoord) (((y) - m_deviceOriginY)/(m_logicalScaleY*m_userScaleY*m_signY*m_scaleY) - m_logicalOriginY);
}
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
wxCoord wxDC::DeviceToLogicalYRel(wxCoord y) const
{
// 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 wxDC::LogicalToDeviceX(wxCoord x) const
{
return (wxCoord) ((x - m_logicalOriginX)*m_logicalScaleX*m_userScaleX*m_signX*m_scaleX + m_deviceOriginX);
}
wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
wxCoord wxDC::LogicalToDeviceXRel(wxCoord x) const
{
// 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 wxDC::LogicalToDeviceY(wxCoord y) const
{
return (wxCoord) ((y - m_logicalOriginY)*m_logicalScaleY*m_userScaleY*m_signY*m_scaleY + m_deviceOriginY);
}
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
wxCoord wxDC::LogicalToDeviceYRel(wxCoord y) const
{
// axis orientation is not taken into account for conversion of a distance
return (wxCoord) (y*m_logicalScaleY*m_userScaleY*m_scaleY);