Hi Simon, yes, spatial subdivision and then a bounding box test before actually testing the bounding box really helps to speed up things. Kevin Lindsey has a number of useful geometry libraries on his website www.kevlindev.com - amongst them a polygon inside/outside and intersection tests. Depending on the element types you use his scripts might work fine for you. I am also using his <path/> element geometry parser.
But really, the implementors should implement SVGSVGElement.getIntersectionList() Andreas > Hi David, > > Before I wrote my original post I considered both approaches you > describe. With your response I started to develop solutions to both > in parallel. I had some success with the approach of artificially > bringing all elements at a point to the front by setting the pointer- > events attribute of the front-most element to null (and tracking each > element with a temporary id attribute so I could later remove this > and the pointer-events attributes). However, I ran into some event > conflicts and reverted to the brute force approach of identifying > each element by its coordinates. In my specific case, what makes the > peformance acceptable and not cumbersome is that my 'canvas' is > spatially divided into nested chunks so I can quite quickly locate > elements instead of iterating over hundreds of them. > > Thank you again for your input - it was very helpful. Let's hope the > developers of SVG implementations add this to their feature lists. > > Simon > ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

