Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.7.2
-
None
Description
You can reproduce this by running the painter paths example with the following paths set:
QPainterPath path0; path0.moveTo(1.0000000000047748,177001.00000000000); path0.lineTo(1.0000000000047748,113001.00000000000); path0.moveTo(165001.00000000000,64001.000000000007); path0.lineTo(165001.00000000000,1.0000000000047748); path0.lineTo(1.0000000000047748,113001.00000000000); path0.lineTo(1.0000000000047748,177001.00000000000); path0.lineTo(165001.00000000000,64001.000000000007); path0.moveTo(274001.00000000006,177001.00000000000); path0.lineTo(274001.00000000006,113001.00000000000); path0.lineTo(165001.00000000000,1.0000000000047748); path0.lineTo(165001.00000000000,64001.000000000007); path0.lineTo(274001.00000000006,177001.00000000000); QPainterPath path1; path1.moveTo(343001.00000000000,177001.00000000000); path1.lineTo(343001.00000000000,113001.00000000000); path1.lineTo(274001.00000000000,113001.00000000000); path1.lineTo(274001.00000000000,177001.00000000000); path1.lineTo(343001.00000000000,177001.00000000000); QPainterPath path; path = path0.united(path1);
The resultant output does not correspond with the part of path0 that is the union of path1. The expected output is an almost identical shape to Path0 but extended on the bottom right with a small square.
The proposed patch which appears to resolve this is to reimplement fuzzyIsNull in qpathclipper.cpp like this:
static inline bool fuzzyIsNull(qreal d) { return qAbs(d) <= 0.01; }
The result of this can be seen in the attached screen shots, showing pre and post patch.