diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2012-10-15 17:06:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-22 19:36:43 +0200 |
commit | b213d5bfa3a8ed81077cd8eaf229764ff2f1b346 (patch) | |
tree | c38b11225116886274631306e6018ffd23cdc2af /src/gui/opengl/qtriangulatingstroker.cpp | |
parent | 11566de014ed22051a53f1f0c94697fd18a87500 (diff) |
Make QPen default to 1-width non-cosmetic.
Use the Qt4CompatiblePainting render hint when painting with QPainter to
treat default constructed QPens as cosmetic still.
The NonCosmeticDefaultPen render hint gets documented as obsolete, since
it was in any case not respected by the raster nor OpenGL paint engine.
Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/gui/opengl/qtriangulatingstroker.cpp')
-rw-r--r-- | src/gui/opengl/qtriangulatingstroker.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/opengl/qtriangulatingstroker.cpp b/src/gui/opengl/qtriangulatingstroker.cpp index 0be6e12721..6c8ab7d607 100644 --- a/src/gui/opengl/qtriangulatingstroker.cpp +++ b/src/gui/opengl/qtriangulatingstroker.cpp @@ -81,7 +81,7 @@ static inline void skipDuplicatePoints(const qreal **pts, const qreal *endPts) } } -void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, const QRectF &) +void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, const QRectF &, QPainter::RenderHints hints) { const qreal *pts = path.points(); const QPainterPath::ElementType *types = path.elements(); @@ -95,7 +95,7 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen, co m_width = realWidth / 2; - bool cosmetic = pen.isCosmetic(); + bool cosmetic = qt_pen_is_cosmetic(pen, hints); if (cosmetic) { m_width = m_width * m_inv_scale; } @@ -519,14 +519,14 @@ QDashedStrokeProcessor::QDashedStrokeProcessor() m_dash_stroker.setCubicToHook(qdashprocessor_cubicTo); } -void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, const QRectF &clip) +void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, const QRectF &clip, QPainter::RenderHints hints) { const qreal *pts = path.points(); const QPainterPath::ElementType *types = path.elements(); int count = path.elementCount(); - bool cosmetic = pen.isCosmetic(); + bool cosmetic = qt_pen_is_cosmetic(pen, hints); m_points.reset(); m_types.reset(); |