From 04912b6a3bcff9087d0679b224cfccee3c05bd10 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 10 Oct 2014 13:20:12 +0200 Subject: [PATCH] Don't use cosmetic GDI pens as this is already accounted for MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Friedemann Kleint --- src/printsupport/kernel/qprintengine_win.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/printsupport/kernel/qprintengine_win.cpp b/src/printsupport/kernel/qprintengine_win.cpp index 14ffcaca96..a1a2f97abe 100644 --- a/src/printsupport/kernel/qprintengine_win.cpp +++ b/src/printsupport/kernel/qprintengine_win.cpp @@ -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);