[Qt-interest] Detecting intersections in a QPainterPath

Ben Swerts benswerts at telenet.be
Mon Aug 9 23:07:12 CEST 2010


Hello all,

I have a QPainterPath created from a number of line and arc segments. This
path is allowed to be concave but it is not allowed to be self-intersecting.

If the path consists of only line segments this self-intersection test is
easy: check for a bounding intersection (with QLineF::intersect) between all
non-adjacent segments.

If the path also contains arced segments I have no idea how I should check
for intersections. I was kind of hoping the existing QPainterPath API
already has something to solve this.

Many thanks in advance!
Greets,


	Ben 




More information about the Qt-interest-old mailing list