Hello,

I am going crazy, I suppose because I don't get something basic in the batik architecture:

I have a SVG document with elements in it (we call them the user's elements).

When I load this SVG, I want to add several layers to display some extra information (warning masks, error masks...) to the elements.

I create a JSVGCanvas which is ALWAYS_DYNAMIC and I load it:

I set a GVTTreeBuilderListener. In the gvtBuildComplete, I create a mask and add it to the dom (appendChild) directly in the SVGDocument (the updateManager tasks are not available at this point

I set another GVTTreeBuilderListener. For each element, I create an other element and append it to the maskLaker.
Same thing, directly in the document.


I set a GVTTreeRendererListener. In the gvtRenderingCompleted, I set a boolean so that at this point, all the modifications are done in the canvas's updateRunnableQueue.

Now I have some threads that posts runnables to the canvas runnable queue to modify attributes of the user's elements and the opacity of the layer's elements.

I can see that only the user's elements are modified. The mask elements are not updated. I decide to dump the SVG from the canvas during the execution (after the rendering) (getSVGDocument()).I open it in squiggle, and oh! the mask elements are displayed OK!!!

So what's wrong with my program? what are the reason why the rendered canvas is not in accordance with the current canvas?

regards

--
Dao Hodac