[Qt-interest] Detecting intersections in a QPainterPath
Carl Snellman
carl.snellman at gmail.com
Mon Aug 9 23:50:52 CEST 2010
API does not seem to have anything to test for intersection of an
already built path...
So how about doing the intersection test when you build the final
path, by piece-wise adding a segment if it does not intersect with
what already is in the final path?
Carl
On Mon, Aug 9, 2010 at 2:07 PM, Ben Swerts <benswerts at telenet.be> wrote:
> 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
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list