diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-22 15:10:21 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-09-22 15:10:21 (GMT) |
commit | 60ceb77c576bc736924b337c457f82900e34c645 (patch) | |
tree | be5a820b3a9ac12e3266055829c2aebb15085a34 /src/gui/painting/qbezier.cpp | |
parent | d52e4462652c925a293a22c2880392e0458735bc (diff) | |
parent | 9a5a12a5fe5bdf848756ddad20dabe288a6873de (diff) | |
download | Qt-60ceb77c576bc736924b337c457f82900e34c645.zip Qt-60ceb77c576bc736924b337c457f82900e34c645.tar.gz Qt-60ceb77c576bc736924b337c457f82900e34c645.tar.bz2 |
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (131 commits)
Fix audio glitches in the audiooutput example.
apply msvc flags to wince too
fix qt static build on wince
fix build with QT_NO_GESTURES
Fixed drawing a large number of glyphs with the same font under GL.
qmake: fix quoting of moc calls
Bump version to 4.7.1.
Improved output of patch_capabilities.pl script
Qt headers must be included before X11 headers
Fixes bezier curves not being drawn when it is a line.
Button remains pressed if release event happens outside of widget
Avoid creating copy of an image in memory when storing as jpeg
Use regparm(3) for ICC too, otherwise it's an ABI mismatch in QChar
Regenerate the Unicode tables after updates to the generator tool
Compile in C++0x mode
remove extra includes
minor clean-ups
minor improvements for data parsers
tiny clean-up for generated data
move QUnicodeTables:: script() and lineBreakClass() implementations
...
Diffstat (limited to 'src/gui/painting/qbezier.cpp')
-rw-r--r-- | src/gui/painting/qbezier.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp index 2a9b31a..54c81ba 100644 --- a/src/gui/painting/qbezier.cpp +++ b/src/gui/painting/qbezier.cpp @@ -293,36 +293,6 @@ static ShiftResult good_offset(const QBezier *b1, const QBezier *b2, qreal offse return Ok; } -static inline QLineF qline_shifted(const QPointF &p1, const QPointF &p2, qreal offset) -{ - QLineF l(p1, p2); - QLineF ln = l.normalVector().unitVector(); - l.translate(ln.dx() * offset, ln.dy() * offset); - return l; -} - -static bool qbezier_is_line(QPointF *points, int pointCount) -{ - Q_ASSERT(pointCount > 2); - - qreal dx13 = points[2].x() - points[0].x(); - qreal dy13 = points[2].y() - points[0].y(); - - qreal dx12 = points[1].x() - points[0].x(); - qreal dy12 = points[1].y() - points[0].y(); - - if (pointCount == 3) { - return qFuzzyCompare(dx12 * dy13, dx13 * dy12); - } else if (pointCount == 4) { - qreal dx14 = points[3].x() - points[0].x(); - qreal dy14 = points[3].y() - points[0].y(); - - return (qFuzzyCompare(dx12 * dy13, dx13 * dy12) && qFuzzyCompare(dx12 * dy14, dx14 * dy12)); - } - - return false; -} - static ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qreal threshold) { int map[4]; @@ -353,17 +323,6 @@ static ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qr if (np == 1) return Discard; - // We need to specialcase lines of 3 or 4 points due to numerical - // instability in intersections below - if (np > 2 && qbezier_is_line(points, np)) { - if (points[0] == points[np-1]) - return Discard; - - QLineF l = qline_shifted(points[0], points[np-1], offset); - *shifted = QBezier::fromPoints(l.p1(), l.pointAt(qreal(0.33)), l.pointAt(qreal(0.66)), l.p2()); - return Ok; - } - QRectF b = orig->bounds(); if (np == 4 && b.width() < .1*offset && b.height() < .1*offset) { qreal l = (orig->x1 - orig->x2)*(orig->x1 - orig->x2) + |