diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-11-13 12:22:41 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-11-13 12:55:44 (GMT) |
commit | aff0df17051c4f251c86bc4d7929930e39514742 (patch) | |
tree | f4795ec7743926859a61d7d9f74edaf51c28dc54 /src/opengl | |
parent | aa784453478ebff299a27eec1683001d2e5084bc (diff) | |
download | Qt-aff0df17051c4f251c86bc4d7929930e39514742.zip Qt-aff0df17051c4f251c86bc4d7929930e39514742.tar.gz Qt-aff0df17051c4f251c86bc4d7929930e39514742.tar.bz2 |
Fixed stroking of discontinuous paths with the GL2 engine.
Since the stroke is rendered as a triangle strip, zero area triangles
must be inserted in order to have gaps in the stroke. This is achieved
by duplicating vertices before and after each gap. It was already done
for open subpaths. This commit fixes gaps between closed subpaths.
Task-number: QTBUG-5736
Reviewed-by: Gunnar
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qtriangulatingstroker.cpp | 3 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtriangulatingstroker_p.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index 1163eba..206104f 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -61,6 +61,9 @@ void QTriangulatingStroker::endCapOrJoinClosed(const qreal *start, const qreal * } else { endCap(cur); } + int count = m_vertices.size(); + m_vertices.add(m_vertices.at(count-2)); + m_vertices.add(m_vertices.at(count-1)); } diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h index defa3f1..a0117d5 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h @@ -188,10 +188,6 @@ inline void QTriangulatingStroker::endCap(const qreal *pts) break; default: break; // to shut gcc up... } - - int count = m_vertices.size(); - m_vertices.add(m_vertices.at(count-2)); - m_vertices.add(m_vertices.at(count-1)); } |