summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpathclipper.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2010-04-08 13:50:46 +0200
committerSamuel Rødal <sroedal@trolltech.com>2010-04-08 14:22:48 +0200
commitbf195e57ff96c326fa26c6b3a4f64e26d18fd9bd (patch)
tree32490d70c21ffa8e932e9f17552cde9856a3a2d0 /src/gui/painting/qpathclipper.cpp
parent75b338aaa8e3c5138718019e95271d8eed5f0c39 (diff)
Fixed bug in QPainterPath::intersected().
When we compute the angle delta we can't use qFuzzyCompare as it will cause slightly negative deltas to be snapped to 0, causing the winged edge builder to put path edges in the wrong order. Task-number: QTBUG-3778 Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qpathclipper.cpp')
-rw-r--r--src/gui/painting/qpathclipper.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 949a820b21..00e74ba7e1 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -935,10 +935,9 @@ qreal QWingedEdge::delta(int vertex, int a, int b) const
qreal result = b_angle - a_angle;
- if (qFuzzyIsNull(result) || qFuzzyCompare(result, 128))
- return 0;
-
- if (result < 0)
+ if (result >= 128.)
+ return result - 128.;
+ else if (result < 0)
return result + 128.;
else
return result;