xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helder Magalhães" <helder.magalh...@gmail.com>
Subject Re: JSVGCanvas object won't resize
Date Wed, 29 Oct 2008 09:55:53 GMT
> There's a lot of Inkscape noise in the file which doesn't help.

Inkscape has "Plain SVG" format option which is appropriate for
interoperable SVG export. This can and probably should be used using
"Save copy as..." File menu option as it will loose the metadata
inserted by Inkscape for editing purposes.



> Does anyone have any idea what could cause this?

As John has stated, adding a viewbox may help. If you want the
document to follow the canvas size, you should might use something
like:

<svg [...] width="100%" height="100%" preserveAspectRatio="xMidYMid
meet" viewBox="0 0 WIDTH HEIGHT">

Naturally, this viewbox attribute value assume origin at (0, 0) and
visible area set to WIDTHxHEIGHT but this can be easily [1] adapted to
match other scenarios.



Hope this helps,

Helder Magalhães



[1] http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute

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