diff options
author | gunnar <gunnar@trolltech.com> | 2009-11-05 18:55:15 (GMT) |
---|---|---|
committer | gunnar <gunnar@trolltech.com> | 2009-11-05 18:59:39 (GMT) |
commit | b185b901ea31bfdc2db781e271132d34d0e8ce32 (patch) | |
tree | f3abc782ebad87eb7b6137d1135fa02c4d22ef96 /src/opengl | |
parent | c4f5a858edbe764f1e899b6c5201a61982e13061 (diff) | |
download | Qt-b185b901ea31bfdc2db781e271132d34d0e8ce32.zip Qt-b185b901ea31bfdc2db781e271132d34d0e8ce32.tar.gz Qt-b185b901ea31bfdc2db781e271132d34d0e8ce32.tar.bz2 |
Fixed bad joins in the new stroker... Normal generation was broken.
Reviewed-by: Trustme
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qtriangulatingstroker_p.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h index 97eabef..defa3f1 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h @@ -129,9 +129,9 @@ inline void QTriangulatingStroker::normalVector(float x1, float y1, float x2, fl float pw; if (dx == 0) - pw = m_width / dy; + pw = m_width / qAbs(dy); else if (dy == 0) - pw = m_width / dx; + pw = m_width / qAbs(dx); else pw = m_width / sqrt(dx*dx + dy*dy); @@ -259,8 +259,6 @@ void QTriangulatingStroker::lineTo(const qreal *pts) - - void QTriangulatingStroker::join(const qreal *pts) { // Creates a join to the next segment (m_cx, m_cy) -> (pts[0], pts[1]) |