simplify coordinate transformation code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-08-19 21:30:06 +00:00
parent b34497d885
commit 772b376785
5 changed files with 53 additions and 103 deletions

View File

@@ -12,9 +12,6 @@
#include "wx/dc.h"
#include <gdk/gdk.h>
#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// wxDC
//-----------------------------------------------------------------------------
@@ -149,48 +146,3 @@ void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
m_signY = (yBottomUp ? -1 : 1);
ComputeScaleAndOrigin();
}
// ---------------------------------------------------------------------------
// coordinates transformations
// ---------------------------------------------------------------------------
wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
{
return ((wxDC *)this)->XDEV2LOG(x);
}
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
{
return ((wxDC *)this)->YDEV2LOG(y);
}
wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
{
return ((wxDC *)this)->XDEV2LOGREL(x);
}
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
{
return ((wxDC *)this)->YDEV2LOGREL(y);
}
wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
{
return ((wxDC *)this)->XLOG2DEV(x);
}
wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
{
return ((wxDC *)this)->YLOG2DEV(y);
}
wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
{
return ((wxDC *)this)->XLOG2DEVREL(x);
}
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
{
return ((wxDC *)this)->YLOG2DEVREL(y);
}