OK
Thanks for everyone's help on this bug.
The crux of it was: The libnrtype/Layout-NG-Output.cpp:185 was setting the visual area for the filter to the inner text drawing, instead of the outer arena where the filter was applied. Thus the filter would often be unset, or worse zeroed by sp-item.cpp as the node got moved around. It would also aquire previous coords as the updates from LayoutNG were going nowhere.
The rest of the modified code from 25 and 28 is reverted. SUVs test passes, drop shadows work and text behaves correctly.
There was one extra niggle, the text visualBounds didn't have the filter area expanded like the sp-item. So I had to have an intermediary step for that to be set and enlarged.
Please test r12556.
Martin,
On Fri, 2013-09-20 at 18:06 +0200, Krzysztof KosiĆski wrote:
Some comments which might help you understand what is going on in the filter code:
The interactive Cairo renderer uses tiling: only one strip of the image is rendered at a time. The SVG specification does not have special provisions for this, and filter rendering is described in terms of operations on pixel buffers that render the entire object at once. Therefore, FER (filter effect region) is well defined in SVG, and corresponds by default to 120% of the width and height of the source object. FER is returned by the function filter_effect_area().
To implement tiling, the function area_enlarge() is used to compute the "dependency area" of the filter - the pixels which must be rendered in order to display the requested tile correctly. This is somewhat wasteful, because for filters effects that contain large dependency regions, we computing lots of pixels but end up using only one tile. There is no perfect solution to this, because allocating a buffer for the entire object is not possible at large zoom levels, though I guess we can do better than at present.
Calling area_enlarge() on Gaussian blur filter will return a bounding box which is expanded by around 2.4 times the standard deviation of the Gaussian blur and clipped to the FER.
I hope this clears up things a bit.
Regards, Krzysztof