Fix for font colors changing after polygon layers (ticket 1294)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9265 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2008-09-05 15:29:13 +00:00
parent 8f70b697fd
commit 6c210764e5

View File

@ -529,6 +529,7 @@ void QgsComposerItem::drawText(QPainter* p, int x, int y, const QString& text, c
p->save();
p->setFont(textFont);
p->setPen(QColor(0, 0, 0)); //draw text always in black
double scaleFactor = 1.0 / FONT_WORKAROUND_SCALE;
p->scale(scaleFactor, scaleFactor);
p->drawText(x * FONT_WORKAROUND_SCALE, y * FONT_WORKAROUND_SCALE, text);
@ -544,6 +545,7 @@ void QgsComposerItem::drawText(QPainter* p, const QRectF& rect, const QString& t
p->save();
p->setFont(textFont);
p->setPen(QColor(0, 0, 0)); //draw text always in black
double scaleFactor = 1.0 / FONT_WORKAROUND_SCALE;
p->scale(scaleFactor, scaleFactor);
p->drawText(scaledRect, Qt::AlignLeft | Qt::AlignTop | Qt::TextWordWrap, text);