summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-09-20 14:49:15 +0200
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 13:06:54 +0300
commita132387975c4e2182ef91d9414b601ebbee6c5cd (patch)
tree25222445a48d5cbf67e2061661118b78a91a5375
parent53eb7c5ee84dd2bfab11d94fb26448b9a94d5380 (diff)
downloadqt4-tools-a132387975c4e2182ef91d9414b601ebbee6c5cd.tar.gz
Fixed color of cosmetic pens when printing under Windows.
When the PS_COSMETIC style is used, the pen width has to be 1. Task-number: QTBUG-13065 Reviewed-by: Samuel (cherry picked from commit 6ecb1be99ff951f35d7b391d6ffb033da696ca74)
-rw-r--r--src/gui/painting/qprintengine_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index ff9e0342a1..de55c49d35 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -850,7 +850,7 @@ void QWin32PrintEnginePrivate::strokePath_dev(const QPainterPath &path, const QC
HPEN pen = ExtCreatePen(((penWidth == 0) ? PS_COSMETIC : PS_GEOMETRIC)
| PS_SOLID | capStyle | joinStyle,
- penWidth, &brush, 0, 0);
+ (penWidth == 0) ? 1 : penWidth, &brush, 0, 0);
HGDIOBJ old_pen = SelectObject(hdc, pen);
StrokePath(hdc);