xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist <mlundqui...@comcast.net>
Subject need help w/ <flowRoot> + getBBox()
Date Mon, 11 Sep 2006 18:36:24 GMT

I need to flow a bit of text into a container, and I gather that I 
should be able to set the height of the container in the onload() 
handler based on the bounding box of... something, but I can't figure 
out what.

I'm using Batik 1.6 and using Squiggle to test my pathetic attempts at 
hacking SVG.  Here's my markup, it's pretty simple:

             fill: black;
             font-size: 30;
       <rect x="0" y="0" width="150" height="75"/>
         Hi from Batik!

So, what am I supposed to take the getBBox() of?  Batik says getBBox is 
undefined for the flowRoot, flowRegion, flowDiv and flowPara elements. 
The only thing left is the rect inside the flowRegion, and its getBBox() 
always returns 150x75, which I guess does not surprise me :-/

And then... on which element will I set the height attribute?  The root 
element, the rect, or both?  Am I even setting this <flowRoot> business 
up correctly in the first place?

Thanks for any help!

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

View raw message