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

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:

<svg
     xmlns="http://www.w3.org/2000/svg"
     version="1.2"
   >
   <flowRoot
       style="
             fill: black;
             font-size: 30;
           "
     >
     <flowRegion
         vertical-align="left"
       >
       <rect x="0" y="0" width="150" height="75"/>
     </flowRegion>
     <flowDiv>
       <flowPara>
         Hi from Batik!
       </flowPara>
     </flowDiv>
   </flowRoot>
</svg>

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!
—ml—


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