X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctgraphics%2Fsgp.cpp;h=a7450936dc65d30d27bcc87d541645bbacca99ce;hb=f96880c086b40f76e691dc107aed6f1481c4d8b1;hp=4b2d5dcfea9cf1c52a8211b0a3d656dfd65ef821;hpb=5ec5449357eaae253d6b1026621262480e2efa63;p=ctsim.git diff --git a/libctgraphics/sgp.cpp b/libctgraphics/sgp.cpp index 4b2d5dc..a745093 100644 --- a/libctgraphics/sgp.cpp +++ b/libctgraphics/sgp.cpp @@ -7,7 +7,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: sgp.cpp,v 1.23 2000/12/25 21:54:26 kevin Exp $ +** $Id: sgp.cpp,v 1.24 2000/12/26 21:13:15 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 @@ -532,7 +532,12 @@ SGP::getTextExtent (const char* szText, double* worldW, double* worldH) if (m_driver.isWX()) { wxString sText (szText); wxCoord deviceW, deviceH; - m_driver.idWX()->GetTextExtent (sText, &deviceW, &deviceH); + m_driver.idWX()->GetTextExtent (sText, &deviceW, &deviceH); + if (m_dTextAngle == 90 || m_dTextAngle == -90) { + wxCoord temp = deviceW; + deviceW = deviceH; + deviceH = temp; + } *worldW = (xw_max - xw_min) * deviceW / static_cast(m_iPhysicalXSize);; *worldH = (yw_max - yw_min) * deviceH / static_cast(m_iPhysicalYSize); }