Hi Stefan,

news <[EMAIL PROTECTED]> wrote on 09/11/2008 11:37:33 AM:

> >>    You should have the BridgeContext (either you created it or the
> >> Transcoder holds a reference to it as 'ctx'). Then just use
> >> the method:
> >>         'GraphicsNode BridgeContext.getGraphicsNode(Node node)'
> >
> > AAAhh ... I have been searching like mad for a method like that but
> > couldn't find it ... how I came to overlook that, I have no idea.
> 
> Sadly it doesn't work, I always get 'null' values back. I don't
> understand how this happens ...

   The problem is that the transcoder tells the bridge context
that it's a 'static' document.  That means that the bridge context
doesn't need to track this info (so it doesn't).  If you set the
bridge context to either interactive or dynamic then it will work.
The easiest way to do that is to override createBridgeContext, call
the base class versions then call 'setDynamicState'.

> I am just using SVGAbstractTranscoder. I call super.transcode in my
> transcoder and then traverse the SVG DOM Tree for A nodes. For those
> nodes I try to get the associated GraphicsNode via
> ctx.getGraphicsNode.
> 
> I do not explicitly build any nodes. As far as I understand,
> SVGAbstractTranscoder does build a complete gvt tree so every DOM node
> should have an associated GraphicsNode ?

    No every DOM node will not have a Graphics Node (like
anything in a defs or stuff in other namespaces) but all the
nodes you should be looking at will.

Reply via email to