Hi everyone,

It seems a simple question, although I'm not being able to find an easy answer: 
how can one determine the actual (screen) viewport size?

I remember using innerWidth/innerHeight in the past (window object properties) 
but AFAIK these are not standard: at least, "Window size and position 
information" isn't addressed in the current Window Object specification [1]. 
Also, for example, these properties aren't supported by Batik [2] and probably 
other "pure" SVG implementations. Nevertheless, they seem to be supported by 
every Web browser that I'm aware of, so could this be seen as a Batik et. al. 
limitation? (That is, could one expect the properties to be made standard in a 
short-to-medium term?)

One could also try getting limit coordinates (using a combination of the 
"width"/"height"/"viewBox" properties) and later do some maths to transform 
them to screen coordinates but intuitively this will fail unless 
"preserveAspectRatio" [3] is set to "none" (which would force the whole viewbox 
to be used but isn't often used as the graphics will appear stretched).

Please shed some light into this matter and/or point me in the right direction: 
maybe I'm just missing something... ;-)


Cheers,
 Helder


[1] http://www.w3.org/TR/Window/
[2] http://xmlgraphics.apache.org/batik/status.html#ecmascript
[3] http://www.w3.org/TR/SVG11/coords.html#PreserveAspectRatioAttribute



------------------------------------

-----
To unsubscribe send a message to: [email protected]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
----Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/svg-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to