Hi !

I'm, trying to implement multiline-text in my software by adding support for 
modifying flowRoot-elements.
To get information about where an element is located, I traverse down to the 
objects in flowRegion, and get the BBox of those objects (since flowRoot, 
flowRegion and such doesn't implement SVGLocatable), and it works perfectly - 
at least until I try to get the transform from the document root down to the 
obects in the flowRegion. It doesn't seem to matter how much I've moved or 
rotated the flowRoot-Element, getTransformToElement() still returns a SVGMatrix 
that shows no transformation what so ever.

Here's a cut out example of the outputted SVG after I've opened the example SVG 
in Batik (flowText.svg), and played around with it a bit:

      <flowRoot font-size="20" id="maintext_0" transform="matrix(0.9591868 
8.604429E-4 -0.41767913 0.73524845 188.0 46.0)">
         <flowRegion>
            <rect x="17" width="200" height="400" y="80"/>
            <rect x="233" width="200" height="400" y="80"/>
         </flowRegion>

         <flowDiv>
            <flowPara indent="20" margin-bottom="10">This is an <flowSpan 
fill="crimson" font-size="40">ex­ample</flowSpan> of a very long string that 
is split ‍across multi­ple lines via text wrap­ping.</flowPara>
         </flowDiv>
      </flowRoot>

As you can see there are some interesting matrix-transformations on the 
flowRoot-element, but when trying to get the transform to the first rect in 
flowRegion, it still returns a SVGMatrix without any transform - dispite the 
fact that the rendering works perfectly.

The call I make to get the transform to the SVGElement e (which in this case 
just happens to be the first rect in flowRegion): 
((SVGSVGElement)e.getOwnerDocument().getDocumentElement()).getTransformToElement((SVGElement)e);

I'm using Batik 1.6. Would it help to upgrade to the latest build, or are there 
some other way to solve this? Or am I simply doing something very wrong?

Regards
Henric Rosvall



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to