aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols/chattutorial/chapter4/sqlcontactmodel.cpp
diff options
context:
space:
mode:
authorMatthias Rauter <[email protected]>2023-11-01 15:50:43 +0100
committerMatthias Rauter <[email protected]>2024-01-07 18:55:28 +0100
commit06e42e733ed6658abbb30ba7be2e571b4533d009 (patch)
tree555c4e1d6072f196407370fd10bfed942ed49fe9 /examples/quickcontrols/chattutorial/chapter4/sqlcontactmodel.cpp
parentac78bf7074c4aa2414b4da38db5b574bec9e4b71 (diff)
Detect and remove self intersections of QQuadPath
Currently the CurveRenderer is not working when the path is self-intersecting. With this patch, the self-intersections are removed before the path is used for filling (optionally, default: on) The stroking path is untouched. The function findOverlappingCandidates finds candidates of elements that might be intersecting. Its complexity is O(n log n) and can also be used in other parts of the code where overlapping bounding triangles need to be identified. The function solveIntersections removes all intersections from a QQuadPath. If intersections are solved, the path is oriented such that the filling is on the right side of the path. If no intersections are found, the path is returned without any changes. The optional argument alwaysReorder can be used to force a reordering of the paths, such that the filling of the shape is always on the right side of the path. Intersections are found with Newtons algorithm with 9 different starting values. This is reliable in finding all intersections but the starting values could be improved/reduced to improve performance. Pick-to: 6.7 Change-Id: I088e4edfff755155521ed91114bc67f63c6e546a Reviewed-by: Paul Olav Tvete <[email protected]>
Diffstat (limited to 'examples/quickcontrols/chattutorial/chapter4/sqlcontactmodel.cpp')
0 files changed, 0 insertions, 0 deletions