Most of what you need can be found in SVGLocatable. The below is not tested, but should be close:
Point awtPoint = ...; Element myEl = document.getElementById("my-el"); SVGPoint svgPoint = document.getRootElement.createSVGPoint(); svgPoint.setX(awtPoint.getX()); svgPoint.setY(awtPoint.getY()); SVGMatrix m = ((SVGLocatable)myEl).getScreenCTM(); m = m.inverse(); svgPoint = svgPoint.matrixTransform(m); On Fri, Feb 26, 2010 at 8:34 AM, dao <dao.ho...@gmail.com> wrote: > hello, > > Sorry for this stupid question: how do I transform coordinates from a AWT > mouse event to the coordinates in the svg file the canvas represents? > > I mean, I have a panel with the canvas (rotated, zoomed, panned in the > worst case) and I want to know the coordinates of the svg point my mouse > cursor is pointing. > > > > -- > Dao Hodac >