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: Scaling SVG Documents
Date Tue, 14 Nov 2006 11:34:31 GMT
Hi André!

I wouldn't use units within the viewBox attribute, I would only use them 
on the width and height attribute.

So, if your original viewBox is like this: "0 0 1000 1000" and you later 
set it to "0 0 100 100" your graphics should zoom in (10% in width and 
height of the original).

If this doesn't work, maybe your svgElement reference is wrong?

To check that you'll have to provide a full example.

Andreas

André Rüdiger wrote:

>Hi Mike!
>
>Thanks for your reply. That was just a typo. I wanted to demonstrate what
>I'm doing which actually is:
>
>    svgElement.setAttributeNS(null, "viewBox", "0px 0px " + width + " " +
>height);
>
>width and height were defined above.
>
>This results in something like
>
>    <svg [...] viewbox="0px 0px 50px 50px">
>
>which doesn't scale the svg.
>
>Does anybody have a solution for svg scaling?
>
>Thanks a lot,
>André
>  
>


-- 
----------------------------------------------
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