** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: sgp.cpp,v 1.5 2000/07/28 08:28:08 kevin Exp $
+** $Id: sgp.cpp,v 1.6 2000/07/28 10:51:31 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
void
SGP::stylusNDC (double x, double y, bool beam)
{
- int xp = static_cast<int>(x * m_iPhysicalXSize + 0.5);
- int yp = static_cast<int>(y * m_iPhysicalYSize + 0.5);
+ int xp = static_cast<int>(x * (m_iPhysicalXSize - 1) + 0.5);
+ int yp = static_cast<int>(y * (m_iPhysicalYSize - 1) + 0.5);
+ if (m_driver.isWX())
+ yp = m_iPhysicalYSize - yp;
+
if (beam) {
if (m_driver.isWX())
m_driver.idWX()->DrawLine (m_iCurrentPhysicalX, m_iCurrentPhysicalY, xp, yp);