Thank you for helping. I will look into that and hopefully can get it figured out. Also I'm having trouble updating the svg files. For example, I change the size of a rectangle with a click, and my canvas does show the change. But when I restart or look at the svg file its not changed. I'm using the setattributns inside of runnable. So what I think its doing is only changing DOM part and not my svg file. If that is correct how do I change my svg file or would I have to create a new svg file and resave it under same name?
Thanks in advance thomas.deweese wrote: > > 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] > > > -- View this message in context: http://www.nabble.com/Determine-points-in-JSVGCanvas-tf2948761.html#a8439152 Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
