Update to wx3.0, add SSE optimizations based on target_cpu, fix compile warnings
[ctsim.git] / libctgraphics / sgp.cpp
index e614a7f9290cd5916d16abd79757f9e56d39fa05..21aa0a650f3e4d24c8f20f7846c4c9c2198b1be9 100644 (file)
@@ -359,7 +359,7 @@ SGP::setRasterOp (int ro)
 {
 #if HAVE_WXWINDOWS
   if (m_driver.isWX()) {
-    int wxFxn = -1;
+    wxRasterOperationMode wxFxn = wxSET;
     switch (ro) {
     case RO_AND:
       wxFxn = wxAND;
@@ -410,8 +410,7 @@ SGP::setRasterOp (int ro)
       wxFxn = wxXOR;
       break;
     }
-    if (wxFxn >= 0)
-      m_driver.idWX()->SetLogicalFunction (wxFxn);
+    m_driver.idWX()->SetLogicalFunction (wxFxn);
   }
 #endif
 }
@@ -522,8 +521,10 @@ SGP::setTextSize (double height)
       double dHeightPixels = height * m_iPhysicalYSize;
       double dHeightPoints = dHeightPixels * m_dPointsPerPixel;
       m_pFont->SetPointSize (nearest<int>(dHeightPoints));
+#if DEBUG
       sys_error (ERR_TRACE, "Setting text size to %d points", 
                  nearest<int>(dHeightPoints));
+#endif
 
       m_driver.idWX()->SetFont (*m_pFont);
   }
@@ -558,7 +559,9 @@ SGP::setTextPointSize (double height)
   if (m_driver.isWX()) {
     m_iTextPointSize = static_cast<int>(height+0.5);
     m_pFont->SetPointSize (m_iTextPointSize);
+#if DEBUG
     sys_error (ERR_TRACE, "Setting point size to %d", m_iTextPointSize);
+#endif
     m_driver.idWX()->SetFont (*m_pFont);
   }
 #endif