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 Bibek Sahu <sc...@dodds.net> on 2004/02/18 16:40:26 UTC

SVGTextContent support in Flow*Element extensions

Howdy all,

I'd like to use FlowText to do text editing in Batik (for an SVG-editor
I'm writing).  I notice that the Flow* elements don't implement the
SVGTextContent interface, so I was wondering: is there a way to do things
like "getCharNumAtPosition()" with the Flow elements?

Thanks!
- Bibek


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


Re: SVGTextContent support in Flow*Element extensions

Posted by Bibek Sahu <sc...@dodds.net>.
Hrm...

I'll keep the minor modifications in mind, for later.  For the moment, I'm
just using the methods out of SVGContext/SVGTextElementBridge (have a tight
deadline).

On a related note, does the TextNode auto-update after a change to a
FlowText element?

I ask because as I enter text in the editor, a dump of the SVGDocument shows
that characters have been added... yet the rendering does not change.  But
when I change the text of a SVGTextElement (or one of its sub-elements) in
the same document, the rendering does get updated.

Is there some quick and easy way to fix this?


Thanks!
- Bibek


On Wed, 18 Feb 2004, Thomas DeWeese wrote:

> Bibek Sahu wrote:
>
> > I'd like to use FlowText to do text editing in Batik (for an SVG-editor
> > I'm writing).  I notice that the Flow* elements don't implement the
> > SVGTextContent interface, so I was wondering: is there a way to do things
> > like "getCharNumAtPosition()" with the Flow elements?
>
>     Well it is entirely possible that only very minor tweaks would be
> needed to enable the existing SVGTextContent interface to be used
> for FlowText.  The underlying GVT implementation is essentially
> identical (there is an additional post-processing step to wrap the
> text but this should 'look' like text on a path to the text content
> support code).
>
>     The FlowText bridge already subclasses from the normal Text Bridge
> so 'getting started' with this shouldn't be too hard.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>


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


Re: SVGTextContent support in Flow*Element extensions

Posted by Thomas DeWeese <Th...@Kodak.com>.
Bibek Sahu wrote:

> I'd like to use FlowText to do text editing in Batik (for an SVG-editor
> I'm writing).  I notice that the Flow* elements don't implement the
> SVGTextContent interface, so I was wondering: is there a way to do things
> like "getCharNumAtPosition()" with the Flow elements?

    Well it is entirely possible that only very minor tweaks would be
needed to enable the existing SVGTextContent interface to be used
for FlowText.  The underlying GVT implementation is essentially
identical (there is an additional post-processing step to wrap the
text but this should 'look' like text on a path to the text content 
support code).

    The FlowText bridge already subclasses from the normal Text Bridge
so 'getting started' with this shouldn't be too hard.




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