xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Neumann <neum...@karto.baug.ethz.ch>
Subject Re: Automatic streching of svg document
Date Mon, 06 Mar 2006 10:38:39 GMT
yes,

that's a very fundamental aspect of "Scalable Vector Graphics"

If you set width="100%" and height="100%" and define a viewBox 
coordinate system, your graphics will always scale to the window width.

The attribute preserveAspectRatio specifies if it scales proportionally 
or not.

See http://www.w3.org/TR/SVG11/coords.html for a definition of viewBox 
and preserveAspectRatio.

Example:

<svg xmlns="http://www.w3.org/2000/svg" 
xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" 
viewBox="0 0 450 250" xml:space="preserve">

</svg>

Andreas

Roger Jakobsen wrote:

> Hello
> Is there a nice way to make the svg displayed in a canvas to 
> automatically stretch when a user re-sizes the window.
> ////roger j
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>


-- 
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


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


Mime
View raw message