[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-users
Subject:    Re: window properties, f.e. window.innerWidth
From:       Andreas Neumann <neumann () karto ! baug ! ethz ! ch>
Date:       2003-10-26 20:59:23
[Download RAW message or body]

What I actually need are the coordinates within the viewPort - exactly the same
coordinates that you display in the Squiggle statusbar. I played around and
found out that getScreenCTM works fine in Batik.

The drawback is that it does not work in ASV3, but works in ASV6. Corel did not
implement it either. So I guess, what I will do is check whether the SVG viewer
has getScreenCTM implemented (Batik, ASV6) and for the other cases got with
innerWidth/Height (Corel, ASV3)


>     Why do you need innerWidth/innerHeight.  For most uses what you
> really want is the size of the viewport:
> 
>    SVGRect r = document.getRoot().getViewport();  // Java
> 
>     var r = document.root.viewport;  // ECMAScript
> 
>     Which _is_ part of the SVG specification.

this only solves half of my problem. With .getViewport() I don't know the know
the offset of the viewPort within the window. When the window is small in X and
high in Y I have a offset in y, when it is wide in X and small in Y I have an
offset in x. .getViewport does not return this offset, but it seems like
.getScreenCTM works fine. So it seems that I don't need innerWidth for solving
my particular problem.

Andreas

--     
The only thing that stands between a man and what he wants from
life is often merely the will to try it and the faith to believe
that it is possible ...
-- M. DeVos
    
----------------------------------------------     
Andreas Neumann - Department of Cartography     
Swiss Federal Institute of Technology (ETH)     
ETH Hoenggerberg, CH-8093  Zurich, Switzerland     
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153     
e-mail: neumann@karto.baug.ethz.ch     
www: http://www.karto.ethz.ch/neumann/     
SVG.Open/Carto.net: http://www.svgopen.org/     

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic