[EMAIL PROTECTED] wrote:

Hello all,

I need to find the closest point on a shape to a given point.

For instance, what is the closest point on a path to a mouseclick?

I have the code to do this given polygonal shapes, but I can't see a way to pry polyline data out of paths, circles, etc.

Any advice?

If you are working with the GraphicsNodes directly. You can get the shape from them and use a 'flattening' path iterator. This will return only straight lines, one should be careful about what coordinate system you do the flattening in however as the content can be in 'odd' coordinate systems (for example the entire screen mapped 0->1 in which case flattening with a tolerance of .5 is not very accurate).



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to