This won't work in Batik currently. When the size of the 'g' with the filter changes (because children are added) we don't currently rebuild the filter so it keeps it's old bounds.
OK, too bad. I can see how it's a complicated situation though, so I understand.
Fortunately this example can be done about as simply by defining a pattern that uses the background content and setting the pattern as the fill for the lines. You need to setup the patternUnits and patternContent units properly but this should not be significantly more difficult than setting up feImage and the filter properly.
The example I gave was a somewhat simplified one. Normally we are using a filter on a much more complicated <g>, not just a simple image. We're taking an existing SVG doc, stuffing it into a new <g> tag which becomes the "background" image used by the filter. Then we draw on top of this. Then the user can selectively erase parts of his drawing, revealing the underlying background <g>. Will the pattern strategy you outline above work for this situation in Batik? I need to do some more reading before I can entirely understand your answer (patternUnits, patternContent, etc,)
This is a general problem in Batik that 'indirect' references like
this are generally not tracked dynamically. We did do some of this
early on but discovered that it introduced huge memory leaks and
backed it out.
I did notice that my machine sometimes comes to a grinding halt due to swapping when I attempt this sort of thing in batik.
Thanks again for your help.
-- George Armhold Rutgers University eLearning Grant, DCIS
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
