diff --git a/src/drivers/QtDriver.cc b/src/drivers/QtDriver.cc index 0047490c3..7b4d632fe 100644 --- a/src/drivers/QtDriver.cc +++ b/src/drivers/QtDriver.cc @@ -61,7 +61,7 @@ using namespace magics; /*! \brief Constructor */ -QtDriver::QtDriver() { +QtDriver::QtDriver() : forceTextPen_(false) { scene_ = 0; initialized_ = false; symbolManager_ = 0; @@ -81,6 +81,11 @@ QtDriver::QtDriver() { // lineWidthFactor_=0.6; lineWidthFactor_ = 0.55; fontSizeFactor_ = 1.1; + + std::string v = getEnvVariable("MV_FORCE_TEXT_PEN"); + if (v == "1" ) { + forceTextPen_ = true; + } } /*! @@ -1165,7 +1170,9 @@ MAGICS_NO_EXPORT void QtDriver::renderText(const Text& text) const { MgQTextItem* item = new MgQTextItem(allText); item->setParentItem(currentItem_); item->setFont(font); - // item->setPen(QPen()); + if (forceTextPen_) { + item->setPen(QPen(Qt::transparent)); + } item->setTextBlanking(text.getBlanking()); item->setBrush(getQtColour(magfont.colour())); @@ -1281,7 +1288,9 @@ MAGICS_NO_EXPORT void QtDriver::renderText(const Text& text) const { MgQTextItem* item = new MgQTextItem(str); item->setParentItem(currentItem_); item->setFont(font); - // item->setPen(QPen()); + if (forceTextPen_) { + item->setPen(QPen(Qt::transparent)); + } item->setTextBlanking(text.getBlanking()); item->setBrush(getQtColour(magfont.colour())); diff --git a/src/drivers/QtDriver.h b/src/drivers/QtDriver.h index 27e05019d..f0b7eca0e 100644 --- a/src/drivers/QtDriver.h +++ b/src/drivers/QtDriver.h @@ -196,6 +196,8 @@ class QtDriver : public BaseDriver, public QtDriverAttributes { MFloat lineWidthFactor_; MFloat fontSizeFactor_; MFloat dpiResolutionRatio_; + + bool forceTextPen_; }; } // namespace magics