Hi Michael,

"Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]> wrote on 
09/25/2008 01:13:47 PM:

>    "The one thing you need to consider is that the rendering transform 
> does interact with the viewing transform (From the viewbox).  So in 
> the case that the window that is viewing the document is a different 
> size/aspect ratio then you may need a different rendering transform 
> to get the same 'view'. "
> 
> In a whiteboarding situation, the document is supposed to stay in 
> sync between clients.  Assuming that we are syncing changes to the 
> viewBox attribute, does this satisfy the need to manage the viewing 
transform?

   I don't think so...

   Since the rendering transform sits outside of the viewing transform
if one client has a window that is say 600 pixels wide and is paned over
so that the left edge is in the middle of the screen their translate
would be 300.   However if that is applied to a Window that is 1200
pixels wide the left edge would only be 1/4 of the way across.

   One way to view this problem is to communicate what points in
the root SVG element's coordinate system correspond to the corners
of the window.  With that in mind it's worth noting that a general
affine transform can be specified by the remapping of three points
(e.g. top left, top right, and bottom left points that are visible
in the document).  So you can easily calculate those points by
mapping the corners of the window to the root SVG element's coordinate
system (on change of the rendering transform).  If you then send 
those points to the other clients they can calculate the transform
that would map those same points to the corners of the new client's 
window (probably with some adjustment for aspect ratio - which is 
simple if you don't allow for non-uniform scaling).  You aren't
done yet because that is the full transform and you need to remove
the existing viewing transform to know what the rendering transform
should be.  Fortunately that is simply a matter of inverting the
viewing transform and multiplying/premultiplying that with the
'full transform' to get the residual that should be set as the
rendering transform.

   I hope that this makes some sense to you.
 
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thu 9/25/2008 6:34 AM
> To: [email protected]
> Cc: [email protected]
> Subject: RE: Tracking changes to the rendering transform?
> 
> 
> 
> 
> Hi Dan,  Michael,
> 
> "Dan Slater" <[EMAIL PROTECTED]> wrote on 09/23/2008 02:01:01 PM:
> 
> > Extend the JSVGCanvas and override the setRenderingTransform method.
> > For example:
> 
>    Yes, this is how I would track changes to the rendering transform. 
> We don't expose it through any of the Swing change API's. 
> 
> >         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);
> >        }
> 
> "Bishop, Michael" <[EMAIL PROTECTED]> wrote on 09/23/2008:
> 
> >> 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? 
> 
>     See above... 
> 
> >> 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.
> 
>    The one thing you need to consider is that the rendering transform 
> does interact with the viewing transform (From the viewbox).  So in 
> the case that the window that is viewing the document is a different 
> size/aspect ratio then you may need a different rendering transform 
> to get the same 'view'. 
> 
> [attachment "winmail.dat" deleted by Thomas E. DeWeese/449433/EKC] 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to