[Qt-interest] Detecting intersections in a QPainterPath

william.crocker at analog.com william.crocker at analog.com
Tue Aug 10 15:27:33 CEST 2010


>>
>> That's certainly an option. Unfortunately I can't seem to find out how to
>> check for the intersection of a line with an arc or the intersection of 2
>> arcs. My google-fu has failed me. I'll continue the search...
>>
>> Thanks,
> 
> Well, perhaps you can use QPainterPath::intersects. It works on other
> painter paths. So, perhaps you can add your arc to a new QPainterPath, and
> if it does not intersect with your existing one, add it to that one.
> 

That might be O(n^2).

Bill



More information about the Qt-interest-old mailing list