Don't use cosmetic GDI pens as this is already accounted for

Since Qt will already handle the cosmetic case when rendering then it
should be respected instead of overriding it by using the cosmetic GDI
pen. This ensures that the pen's width is used and also the color of the
pen.

Task-number: QTBUG-33611
Change-Id: I2719311b3fb5480a5b228c0d415aa545967321cf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
bb10
Andy Shaw 2014-10-10 13:20:12 +02:00
parent 15377a6927
commit 04912b6a3b
1 changed files with 1 additions and 4 deletions

View File

@ -734,10 +734,7 @@ void QWin32PrintEnginePrivate::strokePath_dev(const QPainterPath &path, const QC
else if (pen.joinStyle() == Qt::RoundJoin)
joinStyle = PS_JOIN_ROUND;
bool cosmetic = qt_pen_is_cosmetic(pen, q->state->renderHints());
HPEN pen = ExtCreatePen((cosmetic ? PS_COSMETIC : PS_GEOMETRIC)
| PS_SOLID | capStyle | joinStyle,
HPEN pen = ExtCreatePen(PS_GEOMETRIC | PS_SOLID | capStyle | joinStyle,
(penWidth == 0) ? 1 : penWidth, &brush, 0, 0);
HGDIOBJ old_pen = SelectObject(hdc, pen);