Direct2D QPA: Fix text drawing with brush but no pen

We were incorrectly bailing out early in the text drawing code when there
was no pen. This is incorrect as drawing with only a brush should be
possible.

Change-Id: I94eaadd3cf6c4d82033b5d74d7ca47a05601083f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Louai Al-Khanji 2014-04-15 16:50:10 +03:00 committed by The Qt Project
parent 0c95332f8f
commit d0cf69eaff

View File

@ -1143,7 +1143,7 @@ void QWindowsDirect2DPaintEngine::drawStaticTextItem(QStaticTextItem *staticText
Q_D(QWindowsDirect2DPaintEngine);
D2D_TAG(D2DDebugDrawStaticTextItemTag);
if (qpen_style(d->pen.qpen) == Qt::NoPen)
if (qpen_style(d->pen.qpen) == Qt::NoPen && qbrush_style(d->brush.qbrush) == Qt::NoBrush)
return;
if (staticTextItem->numGlyphs == 0)
@ -1193,7 +1193,7 @@ void QWindowsDirect2DPaintEngine::drawTextItem(const QPointF &p, const QTextItem
Q_D(QWindowsDirect2DPaintEngine);
D2D_TAG(D2DDebugDrawTextItemTag);
if (qpen_style(d->pen.qpen) == Qt::NoPen)
if (qpen_style(d->pen.qpen) == Qt::NoPen && qbrush_style(d->brush.qbrush) == Qt::NoBrush)
return;
const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);