Hello,
I had the same problem.  I ended up getting the root element from the SVGGraphics2D object and adding the attribute to it.   I then called stream(root, writer).  IIRC, the stream(writer) method creates a new root and you lose any custom attributes you may have added.

Hope this helps.

-Jody




"Himerus" <[EMAIL PROTECTED]>

07/23/2004 03:09 PM

Please respond to
"Batik Users" <[EMAIL PROTECTED]>

To
<[EMAIL PROTECTED]>
cc
Subject
viewbox problem





hi,
i'am having a viewbox problem; i put a jsvgscrollpane on a frame; and when i draw a quadcurve2D(or anything else) with a mousePresed event , the scroollpane tries to resize the scrollbars;so in checkAndSetViewBoxRect() the viewBox attribute of the element svg is not found (is returned as ""); i tryed to set it manualy : setAttributeNs(svgNS,"viewBox","0 0 600 600") but it doesn't appear in the document when i stream it to the System.out; and if even that would work, i have to set it again and again every time i draw something on the pane's canvas?

Reply via email to