stylusNDC (0., 0., false);
setTextAngle (0.);
- setTextPointSize (12);
+ setTextPointSize (8);
setColor (C_BLACK);
setLineStyle (LS_SOLID);
setMarker (MARKER_POINT);
static const double dPointsPerInch = 72.;
m_dPointsPerPixel = dPointsPerInch / dScreenDPI;
const int iTestPointSize = 12;
- m_pFont = new wxFont (wxROMAN, wxNORMAL, wxNORMAL, wxNORMAL);
- m_pFont->SetPointSize (iTestPointSize);
- m_pFont->SetWeight (wxNORMAL);
- m_pFont->SetStyle (wxNORMAL);
- m_pFont->SetFamily (wxROMAN);
+ m_pFont = new wxFont (iTestPointSize, wxFONTFAMILY_ROMAN,
+ wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
#ifdef MSVC
m_pFont->SetFaceName(wxString("times new roman"));
#endif
double dHeightPixels = height * m_iPhysicalYSize;
double dHeightPoints = dHeightPixels * m_dPointsPerPixel;
m_pFont->SetPointSize (nearest<int>(dHeightPoints));
+ sys_error (ERR_TRACE, "Setting text size to %d points",
+ nearest<int>(dHeightPoints));
+
m_driver.idWX()->SetFont (*m_pFont);
}
#endif
#if HAVE_WXWINDOWS
if (m_driver.isWX()) {
m_iTextPointSize = static_cast<int>(height+0.5);
- m_pFont->SetPointSize (m_iTextPointSize);
- m_driver.idWX()->SetFont (*m_pFont);
+ m_pFont->SetPointSize (m_iTextPointSize);
+ sys_error (ERR_TRACE, "Setting point size to %d", m_iTextPointSize);
+ m_driver.idWX()->SetFont (*m_pFont);
}
#endif
}
double
SGP::getCharHeight ()
{
- double dHeight = (1. / 25.);
+ double dHeight = (1. / 50.);
#if HAVE_WXWINDOWS
if (m_driver.isWX()) {
dHeight = m_driver.idWX()->GetCharHeight();
dHeight /= static_cast<double>(m_iPhysicalYSize);
- dHeight /= (yv_max - yv_min); // scale to viewport;
+ dHeight /= (yv_max - yv_min); // scale to viewport;
}
#endif
dHeight *= (yw_max - yw_min); // scale to world coordinates
if (m_driver.isWX()) {
dWidth = m_driver.idWX()->GetCharWidth();
dWidth /= static_cast<double>(m_iPhysicalXSize);
- dWidth /= (xv_max - xv_min); // scale to viewport
+ dWidth /= (xv_max - xv_min); // scale to viewport
}
#endif
dWidth *= (xw_max - xw_min); //scale to world coordinates