xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helder Magalhães <helder.magalh...@gmail.com>
Subject Re: Recipe needed: Elements outside the RenderingTransform context
Date Tue, 17 Mar 2009 11:58:55 GMT
Hi Alan Deikman,

> What I think is needed for many applications is a way in a JSVGCanvas to
> have controls that do not zoom, pan, and rotate with the rest of the
> picture.
> Any suggestions?

Something like the following (ECMAScript) might help:

  var iCTM = (document.documentElement.getScreenCTM()).inverse();
  var newMatrix = document.documentElement.createSVGTransformFromMatrix(iCTM);
  var targetElement = document.getElementById("YourElementID");

It can be used in your "reset" button or similar, or simply attached
to UA events such as zoom, resize, etc. in order to create the
illusion of elements which do not resize. :-)

This should work in current SVG implementations (Batik, Firefox,
Opera, Webkit). I believe ASV and possibly other implementations
require additional trickery in order to work.

Also, it should be fairly easy to adapt this to Java environment. ;-)
Comments and other possible solutions are naturally welcome. :-)

Hope this helps,

  Helder Magalhães

To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message