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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
----------------------------------------------
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: [EMAIL PROTECTED]
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to