xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hardy <vincent.ha...@sun.com>
Subject Re: Batik Generator How to include viewBox
Date Mon, 06 Jan 2003 08:32:51 GMT
Hello Bryan,

You'll need to do something like:

SVGGraphics2D g = ....;
g.setSVGCanvasSize(new Dimension(800, 600));
// ...
// Draw into g
// ....
Element root = g.getRoot();
root.setAttributeNS(null, "viewBox", "0 0 800 600");

// In case you want to stream through g
g.setRoot(g);

Regards,
Vincent.

Bryan Scott wrote:
> Hi
> 
> I am hoping that someone has some sample code for how to include a
> viewBox attribute to the svg element using batik?
> 
> I can generate SVG graphics, but I cannnot get it to include a viewBox
> attribute. i.e something like :
> <svg ......... width="800" height="600" viewBox="0 0 800 600">
> 
> I am heading to sea today for three months so could replies be cc'ed to
> bryan.scott@aurora.aad.gov.au, as we do not have net access.
> 
> Many thanks.
> 
> 
> Bryan Scott
> Marine Science Support
> Australian Antarctic Division
> 
> 
> ___________________________________________________________________________
> 
>     Australian Antarctic Division - Commonwealth of Australia
> IMPORTANT: This transmission is intended for the addressee only. If you are
> not the intended recipient, you are notified that use or dissemination of
> this communication is strictly prohibited by Commonwealth law. If you have
> received this transmission in error, please notify the sender immediately
> by e-mail or by telephoning +61 3 6232 3209 and DELETE the message.
>         Visit our web site at http://www.aad.gov.au/
> ___________________________________________________________________________
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 



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


Mime
View raw message