summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpathclipper/tst_qpathclipper.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2010-02-05 09:13:14 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2010-02-15 14:42:38 (GMT)
commit8d7046fbd798c6104eca6098b828c505ca32085c (patch)
tree6390afc523e578e30e2fbb87652c3a3d10fc4cdf /tests/auto/qpathclipper/tst_qpathclipper.cpp
parentc77f37f8d9ed021c8a61f50a571b117588e9258f (diff)
downloadQt-8d7046fbd798c6104eca6098b828c505ca32085c.zip
Qt-8d7046fbd798c6104eca6098b828c505ca32085c.tar.gz
Qt-8d7046fbd798c6104eca6098b828c505ca32085c.tar.bz2
Improved performance of path vs path intersection where one is a rect.
By special-casing path vs rect intersections we can get much better performance and more robust clipping. Task-number: QTBUG-7396 Reviewed-by: Gunnar Sletta
Diffstat (limited to 'tests/auto/qpathclipper/tst_qpathclipper.cpp')
-rw-r--r--tests/auto/qpathclipper/tst_qpathclipper.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/auto/qpathclipper/tst_qpathclipper.cpp b/tests/auto/qpathclipper/tst_qpathclipper.cpp
index 5b49545..9e37988 100644
--- a/tests/auto/qpathclipper/tst_qpathclipper.cpp
+++ b/tests/auto/qpathclipper/tst_qpathclipper.cpp
@@ -336,13 +336,17 @@ static QPainterPath samplePath13()
static QPainterPath samplePath14()
{
QPainterPath path;
- path.moveTo(QPointF(100, 180));
- path.lineTo(QPointF(100, 80));
- path.lineTo(QPointF(120, 80));
- path.lineTo(QPointF(120, 100));
- path.lineTo(QPointF(160, 100));
- path.lineTo(QPointF(160, 180));
- path.lineTo(QPointF(100, 180));
+
+ path.moveTo(160, 80);
+ path.lineTo(160, 180);
+ path.lineTo(100, 180);
+ path.lineTo(100, 80);
+ path.lineTo(160, 80);
+ path.moveTo(160, 80);
+ path.lineTo(160, 100);
+ path.lineTo(120, 100);
+ path.lineTo(120, 80);
+
return path;
}