summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgunnar <gunnar@trolltech.com>2009-11-05 18:55:15 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-11-06 13:07:38 (GMT)
commite9ed3d523ecec3a9af58c78dbe3fbf4c7cc6d6fe (patch)
tree533a06d04a286ee927e159af8d7f544dc73d7ec2
parent5864f84b22e7ce6dfc49b50c3f56e7792af1076b (diff)
downloadQt-e9ed3d523ecec3a9af58c78dbe3fbf4c7cc6d6fe.zip
Qt-e9ed3d523ecec3a9af58c78dbe3fbf4c7cc6d6fe.tar.gz
Qt-e9ed3d523ecec3a9af58c78dbe3fbf4c7cc6d6fe.tar.bz2
Fixed bad joins in the new stroker... Normal generation was broken.
Reviewed-by: Trustme
-rw-r--r--src/opengl/gl2paintengineex/qtriangulatingstroker_p.h6
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])