I don't know if this is the answer you are looking for, but I needed to respond to changes in the rendering transform to update a cursor position widget, with the new user space position, when the document was panned/scrolled etc. Since the document wasn't changed, my document listeners didn't work. This is how I did it:
Extend the JSVGCanvas and override the setRenderingTransform method. For example:
public void setRenderingTransform(final AffineTransform at) {
//System.out.println("JSVGCanvasX set rendering transform...");
setRenderingTransform(at, true);
Point2D.Double pt2d = new Point2D.Double(locationListener.getLastX(),locationListener.getLastY());
SVGSVGElement root = this.getSVGDocument().getRootElement();
if (root != null) setUserPositionXY(pt2d, root);
}
In my particular application, the SVGCanvas is an inner class so it has easy access to the outer's API. Hope this helps...
Dan Slater
-------- Original Message ----------------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Subject: Tracking changes to the rendering transform?
From: "Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]>
Date: Tue, September 23, 2008 11:44 am
To: <[email protected]>
Hi all,
I'm in a whiteboarding situation where I want to communicate my "view" to other users. If I pan/zoom/etc, I want to be able to notify the other users as to what I'm looking at. I'm talking about view changes that do not modify the document.
I believe I can do this by tracking the render transform. Is there a way to listen for changes to the render transform? Is there anything else I have to think about tracking to achieve this goal? I know the "viewBox" attribute exists, but that's different; it's a modification to the document itself.
Michael Bishop
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
