From 6ecb1be99ff951f35d7b391d6ffb033da696ca74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Mon, 20 Sep 2010 14:49:15 +0200 Subject: 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 --- src/gui/painting/qprintengine_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp index dd4de99..afae0a5 100644 --- a/src/gui/painting/qprintengine_win.cpp +++ b/src/gui/painting/qprintengine_win.cpp @@ -851,7 +851,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); -- cgit v0.12