batik-users@xmlgraphics.apache.org
[Top] [All Lists]

RE: flowRoot text-decoration bug

Subject: RE: flowRoot text-decoration bug
From:
Date: Thu, 21 Jun 2007 06:29:40 -0400
Hi John,

"John Hinke" <hinke@xxxxxxxxxxxxxxx> wrote on 06/19/2007 11:15:08 AM:

> I'll file a bug (it's always good to remember them anyway). But I'd be 
more
> interested in trying to fix this myself.  Would you be willing to give 
me a
> few pointers on where to start looking?  I just need something fairly
> short-term right now.

      The decorations are drawn by the class 
batik.gvt.renderer.StrokingTextPainter, in the method 'paintDecorations'.
This code assumes a decoration is a single 'line'.  It also depends on
batik.gvt.text.GlyphLayout to provide raw geometry, this class also 
assumes
decorations are a single line.

> For my application I take another XML model and translate that into SVG 
for
> output to PDF or JPG.  One solution I've considered is to find some 
Batik
> API that would let me extract out the lines of text that the flowRoot 
code
> generates and then re-generate the SVG document using plain <text> 
elements.
> I'm not thrilled by this approach but it would work for me in the short
> term.

   The code that does the wrapping is batik.gvt.flow.FlowTextPainter.
It collects the lines in a list, lineInfos but currently that is dropped
at the end of the 'textWrap' method.

> Any idea what API I might want to use (or even locally hack up) that I 
could
> feed it a flowRoot element and get back a set of lines.  I'm more than
> willing to cut and extract code to get this working.

   I think if you had the List of LineInfo Objects you could do something.
It's worth noting that FlowTextPainter is a subclass of 
StrokingTextPainter,
so it could override 'paintDecorations' to draw decorations better.

> > -----Original Message-----
> > Hi John,
> >
> > "John Hinke" <johnhinke@xxxxxxxxx> wrote on 06/18/2007 10:24:07 AM:
> >
> > > I've run across what I think is a bug in the flowRoot rendering 
code:
> > > text-decoration styles don't show up.  Here's the example SVG:
> >
> >    Well, you are right.  Flow text ignores text-decoration (incomplete
> > implementation). However, since we still don't have an idea where the
> > SVG WG is going with wrapped text in SVG 1.2 Full it's not likely to
> > be fixed any time real soon.
> >
> >    You can file a bug report if you want, but I doubt much work will
> > be done on it until SVG 1.2 Full is fairly well settled.
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: batik-users-help@xxxxxxxxxxxxxxxxxxxxxx
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: batik-users-help@xxxxxxxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>