feDisplacementMap ignores content outside of the view box
I just noticed that feDisplacementMap causes transparent regions around the border of the image when displacing graphics larger than the view box. I'm guessing the pixels outside of the image bounds are considered blank and get displaced into the image. Is this the correct behaviour? (If it is, pointers to workarounds would be much appreciated.)
Here's a minimal example...
<svg preserveAspectRatio="xMidYMid" viewBox="-100 -100 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<filter color-interpolation-filters="sRGB" id="displacement-filter">
<feTurbulence baseFrequency="0.03" numOctaves="3" result="turbulence" seed="0" type="fractalNoise"/>
<feDisplacementMap in="SourceGraphic" in2="turbulence" scale="78" xChannelSelector="R" yChannelSelector="G"/>
</filter>
</defs>
<g fill="none" filter="url(#displacement-filter)" stroke="#292d2f" stroke-width="0.2">
<!-- This rectangle is larger than the view box -->
<rect fill="#f66f5d" height="600" width="600" x="-300" y="-300"/>
<circle cx="0" cy="0" fill="#ffffff" r="60" stroke="none"/>
</g>
</svg>
...resulting in this image with transparent regions close to the edges.
And here's the result I expected.
Edited by Stuffmatic