Hi Vyang, vyang <[EMAIL PROTECTED]> wrote on 01/15/2007 10:45:16 AM:
> I also do use getIntersectionList() and it does return the correct elements, > however, how do I get the element point that is near where I clicked? One needs to be clear what part of element you are interested in. If getInstersectionList includes the element then the given rectangle (probably just a one pixel rect in your case) is in the element. I suspect you are curious what point on the outline of the element is closest to the point clicked. The problem with this is that several points may be closest to the point (think clicking in the center of a circle ;). That all said for SVG <path/> elements you can use the DOM interfaces: float getTotalLength() SVGPoint getPointAtLength(float d); To sample the path comparing the SVGPoints with your desired Point. If you are a glutton for punishment you can also work your way through the animatedNormalizedPathSegList and do a more scientific comparison (for straight lines there is a simple closed form for closest point on line, it get's harder for quadratic and cubic beziers, much less elliptical arcs). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]