summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtessellator/oldtessellator.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-05-18 13:13:10 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-18 13:13:10 (GMT)
commit3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2 (patch)
treeb35fb5f723752378dd4fede93a6c35c0aeb85ad2 /tests/auto/qtessellator/oldtessellator.cpp
parent1aeccd6bd14d7d9e098e333715f63e0225cd4a54 (diff)
parent2c07b5d2cba8d8e499bd0861eefef12d4e00d99a (diff)
downloadQt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.zip
Qt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.tar.gz
Qt-3b7b05ce8db881acfdcf193b3c8fb3d4919eb1c2.tar.bz2
Merge remote-tracking branch 'origin/4.8'
Diffstat (limited to 'tests/auto/qtessellator/oldtessellator.cpp')
-rw-r--r--tests/auto/qtessellator/oldtessellator.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/auto/qtessellator/oldtessellator.cpp b/tests/auto/qtessellator/oldtessellator.cpp
index 78f117f..bc24d7e 100644
--- a/tests/auto/qtessellator/oldtessellator.cpp
+++ b/tests/auto/qtessellator/oldtessellator.cpp
@@ -80,19 +80,6 @@ struct QEdge {
horizontal = p1.y == p2.y;
}
- inline qreal xAt(const qreal &y) const
- {
- Q_ASSERT(p1.y != p2.y);
- XFixed yf = XDoubleToFixed(y);
-
- if (yf == p1.y)
- return XFixedToDouble(p1.x);
- else if (yf == p2.y)
- return XFixedToDouble(p2.x);
-
- return (!vertical) ? (((y - b)*im)) : pf1.x();
- }
-
QPointF pf1, pf2;
XPointFixed p1, p2;
qreal m;
@@ -218,7 +205,8 @@ void old_tesselate_polygon(QVector<XTrapezoid> *traps, const QPointF *pg, int pg
qreal ymax(INT_MIN/256);
//painter.begin(pg, pgSize);
- Q_ASSERT(pg[0] == pg[pgSize-1]);
+ if (pg[0] != pg[pgSize-1])
+ qWarning() << Q_FUNC_INFO << "Malformed polygon (first and last points must be identical)";
// generate edge table
// qDebug() << "POINTS:";
for (int x = 0; x < pgSize-1; ++x) {
@@ -383,7 +371,8 @@ void old_tesselate_polygon(QVector<XTrapezoid> *traps, const QPointF *pg, int pg
isects[i].edge = edge;
}
- Q_ASSERT(isects.size()%2 == 1);
+ if (isects.size()%2 != 1)
+ qFatal("%s: number of intersection points must be odd", Q_FUNC_INFO);
// sort intersection points
qSort(&isects[0], &isects[isects.size()-1], compareIntersections);