Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.9.1
-
None
Description
Hello,
We attempted to use QPainterPath::simplified() as a workaround for https://bugreports.qt.io/browse/QTBUG-67058 (drawing paths containing holes which touch or are very close to the outer subpath). Unfortunately, we experienced that for some rare cases filling a simplified path produces very different results than filling a raw path.
This appears to be some kind of numerical instability in the algorithm, since changing the precision of numbers used to form an area produces drastically different results - filling of an original path seems to be always correct, while filling of a simplified path for some rare complex paths becomes an opposite to what's expected. It's easy to see a practical difference between red and green subpictures in attached screenshots.
The screenshots can reproduced by compiling an attached test case and running
./aexe <number>, where <number> corresponds to a number in the picture file. For example, ./aexe 14 produces the right red subpicture and ./aexe 16 produces the wrong red subpicture. Green subpictures show raw paths and red subpictures show simplified paths.
Attachments
Issue Links
- relates to
-
QTBUG-67058 QPainter does not skip zero-pixel thin subareas when antialiasing is enabled
- Reported