From 6c8dcd5744e2c14d122f0967de72a9e171dd9715 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Mon, 20 Sep 2010 13:53:23 +0200 Subject: Fixes QPen dash offset for OpenGL paint engines (1.x & 2.x). Task-number: QTBUG-13409 Reviewed-by: Trond --- src/opengl/gl2paintengineex/qtriangulatingstroker.cpp | 1 + src/opengl/qpaintengine_opengl.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index 9bc099d..7b0b8a2 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -509,6 +509,7 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c m_dash_stroker.setDashPattern(pen.dashPattern()); m_dash_stroker.setStrokeWidth(cosmetic ? width * m_inv_scale : width); + m_dash_stroker.setDashOffset(pen.dashOffset()); m_dash_stroker.setMiterLimit(pen.miterLimit()); m_dash_stroker.setClipRect(clip); diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 12c487d..a5ec12f 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -921,6 +921,7 @@ static inline QPainterPath strokeForPath(const QPainterPath &path, const QPen &c stroker.setCapStyle(cpen.capStyle()); stroker.setJoinStyle(cpen.joinStyle()); stroker.setMiterLimit(cpen.miterLimit()); + stroker.setDashOffset(cpen.dashOffset()); qreal width = cpen.widthF(); if (width == 0) -- cgit v0.12