Hi Mathieu, [email protected] wrote on 07/01/2009 08:36:10 AM:
> The problem is that i need to kwow the exact position of my mouse in > the SVGDocument system coordinates! Until today, my method was to > take the coordinates of the mouse in the jsvgCanvas and to apply to > these the rendering tranform (it works pretty much with svg > documents without the viewbox attibute defined). > > Is there a method of batik which could help me to get theese coodinate? The best way to accomplish this would be to use the SVG DOM, and calling getScreenCTM on the root SVG element. > Do I have to deal with the "viewbox rendering transform" (wich isn't > a part of the classi rendering transform and wich i don't know where > it's hidden in the Batik API...) manually? You do have to deal with it, but you don't need to do it manually. You could also use 'getViewBoxTransform' with returns the transform from the local coordinate system of the root svg element to screen coordinates. > 2009/6/30 Mathieu Pedrero <[email protected]> > Hello everybody! > > I just noticed out something strange about the JSVGCanvas component: > I added a JSVGCanvas to a frame, and then I added a small svg > document to this canvas. > > And When i resize my frame, the svg picture comes bigger and bigger! > But the rendering transform doesn't change at all (I control it by > the getRenderingTransform method)! I looks strange to me because i > thought this automatic resizement of my picture was a kind of zoom action. > > The problem, so, is that i need to keep to know the "real" rendering > transform of the picture at screen (even with the values of > transform due to frame resizement, and not only actions of the mouse > interactors of the canvas). > > Can you help me please? > > Thanks a lot!
