Omar Abdala wrote:

I have a question about using Java Batik. I have a JSVGCanvas within which
I'm displaying SVG files. I want to add a listener to it that will listen
for mouse clicks on the Canvas and calculate the point that was clicked in
terms of the SVG files' coordinates. Is there some standard way of doing
this or is it an easy calculation?

The easiest thing to do is add a DOM 'click' event listener on the root SVG element. Then you can use SVGElement.getScreenCTM to get the transform from any SVG element's coordinate system to the screen coordinate system (the coordinate system for DOMEvent.getClientX/Y).





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



Reply via email to