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:
parent
0c95332f8f
commit
d0cf69eaff
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user