[Interest] Distance from point to path.
william.crocker at analog.com
william.crocker at analog.com
Mon Dec 28 22:49:20 CET 2015
Hello:
Given a QPoint and a QPainterPath.
How do I find the distance from the QPoint to the
closest point along the QPainterPath.
I could step along the path with pointAtPercent
looking for the closest point, but that seems unduly
expensive: O(100N).
Any better ideas.
Thanks.
Bill
---------
All of the above to find the shape closest to a mouse click.
Note that methods are provided to find the set of objects
which intersect a rectangle centered on the point, but which one
is really the closest?
More information about the Interest
mailing list