X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctgraphics%2Fsgp.cpp;h=feedcbbf9b699fcff549f2320dc079ba24ddef3c;hp=e614a7f9290cd5916d16abd79757f9e56d39fa05;hb=4b49778f44b9149451ba36e5f1bd7830c74c8fee;hpb=d84febd85035c7985334618cdda43df21824efbe diff --git a/libctgraphics/sgp.cpp b/libctgraphics/sgp.cpp index e614a7f..feedcbb 100644 --- a/libctgraphics/sgp.cpp +++ b/libctgraphics/sgp.cpp @@ -359,7 +359,7 @@ SGP::setRasterOp (int ro) { #if HAVE_WXWINDOWS if (m_driver.isWX()) { - int wxFxn = -1; + wxRasterOperationMode wxFxn; switch (ro) { case RO_AND: wxFxn = wxAND; @@ -409,9 +409,10 @@ SGP::setRasterOp (int ro) case RO_XOR: wxFxn = wxXOR; break; + default: + return; } - if (wxFxn >= 0) - m_driver.idWX()->SetLogicalFunction (wxFxn); + m_driver.idWX()->SetLogicalFunction (wxFxn); } #endif } @@ -522,8 +523,10 @@ SGP::setTextSize (double height) double dHeightPixels = height * m_iPhysicalYSize; double dHeightPoints = dHeightPixels * m_dPointsPerPixel; m_pFont->SetPointSize (nearest(dHeightPoints)); +#if DEBUG sys_error (ERR_TRACE, "Setting text size to %d points", nearest(dHeightPoints)); +#endif m_driver.idWX()->SetFont (*m_pFont); } @@ -558,7 +561,9 @@ SGP::setTextPointSize (double height) if (m_driver.isWX()) { m_iTextPointSize = static_cast(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