You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Madiraju, Sharma" <sh...@pmplimited.com.au> on 2003/10/16 10:10:53 UTC

Converting flowtext into multiple text elements.

Hi 
I have a flow text element displaying multiple text lines. I want to
convert each line in the 
Flow text into a separate Tspan element. Is there any simpler way?
Thanks
sharma




**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the administrator at administrator@pmplimited.com.au
This footnote also confirms that this email message has been swept 
for the presence of computer viruses, inappropriate content and
security issues, although we try our best to check for these errors 
please scan all messages yourself.
PMP Limited ABN 39 050 148 644                      
PMP Print Pty Limited ABN 76 051 706 499


Re: Converting flowtext into multiple text elements.

Posted by Thomas DeWeese <Th...@Kodak.com>.
Madiraju, Sharma wrote:
> I have a flow text element displaying multiple text lines. 
> I want to convert each line in the Flow text into a separate 
> Tspan element.
> Is there any simpler way?

Hi Madiraju,

    Simpler than what?

    There are a couple of routes you could go here.
The simplest (and ugliest) would be to hack the existing
layout code in batik.gvt.text.GlyphLayout so it spits out
tspans to some Stream (or a String) rather than
(or in addition to) actually positioning the Glyphs
in the GlyphVector.

    You could also potentially 'post processes' the
layout codes output to determine what ended up where.
(when X coord decreases and Y increases it is a new line
etc).  This would be a bit cleaner since you would not
be modifying the actual layout code.



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