summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpathclipper.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2010-04-22 16:04:09 +0200
committerSamuel Rødal <sroedal@trolltech.com>2010-04-22 16:27:37 +0200
commitd7b4d694214d1dd8ef84ac2ae69c94b8564fd8d7 (patch)
treeb144330f89e649e78df4a972277e1b63d9329907 /src/gui/painting/qpathclipper.cpp
parent24f82844af3f91fc089f3b1807724bfabfff19e5 (diff)
Fixed autotest failures in tst_QPainterPath.
The simplified test failed because the ellipse was flattened into line segment. The other tests were due to a behavioral change in contains() and intersect() caused by using fill based intersection in change f7d61dab69308f0993c8a5f2232226d1713ac4a7. This needs to be reverted, since it will return false for a rect containing a line (with no fill area). Instead a different fix was needed in linesIntersect() to prevent testIntersections() in tst_QPathClipper from failing. Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qpathclipper.cpp')
-rw-r--r--src/gui/painting/qpathclipper.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 4d319a452c..9dedf3a490 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -162,11 +162,6 @@ bool QIntersectionFinder::linesIntersect(const QLineF &a, const QLineF &b) const
return false;
}
- // if the lines are not parallel and share a common end point, then they
- // don't intersect
- if (p1_equals_q1 || p1_equals_q2 || p2_equals_q1 || p2_equals_q2)
- return false;
-
const qreal invPar = 1 / par;
const qreal tp = (qDelta.y() * (q1.x() - p1.x()) -
@@ -1236,7 +1231,7 @@ bool QPathClipper::intersect()
}
}
- return !clipPath.intersected(subjectPath).isEmpty();
+ return false;
}
bool QPathClipper::contains()
@@ -1273,7 +1268,7 @@ bool QPathClipper::contains()
}
}
- return clipPath.subtracted(subjectPath).isEmpty();
+ return true;
}
QPathClipper::QPathClipper(const QPainterPath &subject,