+#ifdef HAVE_WXWINDOWS
+void
+SGP::initFromDC (wxDC* pDC)
+{
+ m_pen.SetWidth (1);
+
+ if (m_driver.isWX()) {
+ static const double dScreenDPI = 82;
+ 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);
+#ifdef MSVC
+ m_pFont->SetFaceName(wxString("times new roman"));
+#endif
+ m_driver.idWX()->SetFont (*m_pFont);
+ double dTestCharHeight = m_driver.idWX()->GetCharHeight();
+ m_dPointsPerPixel = iTestPointSize / dTestCharHeight;
+ m_driver.idWX()->SetBackground (*wxWHITE_BRUSH);
+ }
+}
+#endif
+
+
+SGP::~SGP()
+{
+#if HAVE_WXWINDOWS
+ if (m_driver.isWX()) {
+ // m_driver.idWX()->SetFont (wxNullFont);
+ delete m_pFont;
+ }
+#endif
+}
+