[Qt-interest] Detecting intersections in a QPainterPath
Atlant Schmidt
aschmidt at dekaresearch.com
Tue Aug 10 16:51:00 CEST 2010
Ben:
To simplify things, are there any bounds we can place
upon the "problem space"?
For example, is there a maximum XY rect that will
encompass all possible paths?
Asking the question from the opposite direction,
are the vertices of the paths points specified as
integer [X,Y] pairs or are they arbitrarily fine-
pitched floating point pairs?
If both limits can be applied (so you have a
bounded space of integer points), we might take
a different approach than if the space can be either
arbitrarily large or arbitrarily "fine-grained".
Atlant
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Ben Swerts
Sent: Monday, August 09, 2010 17:07 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Detecting intersections in a QPainterPath
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
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
Thank you.
Please consider the environment before printing this email.
More information about the Qt-interest-old
mailing list