So, i tried to understand how to convert coordinates system to another to
update bounding box position...
i would that you say me if this code that i wrote to map coordinates system
of bounding box is correct:

DOMMouseEvent elEvt = (DOMMouseEvent)evt;

SVGMatrix mat = ((SVGLocatable)shape).getScreenCTM();
SVGMatrix imat = mat.inverse();
bPt = doc.getRootElement().createSVGPoint();
bPt.setX(elEvt.getClientX());
bPt.setY(elEvt.getClientY());
bPt = bPt.matrixTransform(imat); 

then, when i release the button, i re-mapping the coordinate system of
bounding box to the shape coordinate system (the position of shape is
changed):
SVGMatrix rb = ((SVGLocatable)shape).getScreenCTM(); 
bPt = bPt.matrixTransform(rb);
-- 
View this message in context: 
http://www.nabble.com/map-coordinates-tf2938566.html#a8215638
Sent from the Batik - Users mailing list archive at Nabble.com.


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

Reply via email to