xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist <mlundqui...@comcast.net>
Subject Re: need help w/ <flowRoot> + getBBox()
Date Thu, 14 Sep 2006 03:43:02 GMT
thomas.deweese@kodak.com wrote:


> 
>>1) Am I on the right track here with getExtentOfChar()?
> 
> 
>    Yes, absolutely.

Sweet :-)

> 
> 
>>2) What's the deal w/ the NPE, is trunk broken?
> 
> 
>    It is possible.  Can you send a small standalone
> example that shows the problem?

Certainly, here it is!
======================


<?xml version="1.0"?>

<svg
     xmlns="http://www.w3.org/2000/svg"
     version="1.2"
     onload="onload()"
   >
   <flowRoot
       style="
             fill: black;
             font-size: 30;
           "
     >
     <flowRegion
         vertical-align="middle"
       >
       <!-- BTW, how do I make this transparent now?  -->
       <rect style="fill: white" x="0" y="0" width="150" height="75"/>
     </flowRegion>
     <flowDiv
       >
       <flowPara id="text">
         Hi from Batik!
       </flowPara>
     </flowDiv>
   </flowRoot>

   <script><![CDATA[
     function onload() {
       var text = document.getElementById ('text');
       alert (text);   // so far so good...
       alert (text.getExtentOfChar);   // yeah baby...
       alert (text.getExtentOfChar(1));  // D'oh!!!!
     }
   ]]></script>
</svg>



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