W3C home > Mailing lists > Public > www-svg@w3.org > May 2008

Re: filter primitive subregion and feGaussianBlur

From: Robert O'Callahan <robert@ocallahan.org>
Date: Mon, 12 May 2008 11:08:06 -0700
Message-ID: <11e306600805121108g5e522d67gf1ea77cb1c0acd8a@mail.gmail.com>
To: www-svg <www-svg@w3.org>
On Sun, May 11, 2008 at 7:29 PM, Robert O'Callahan <robert@ocallahan.org>
wrote:

> "Restricts calculation" is a bit ambiguous. Does this mean:
> -- The implementation takes a snapshot of the input image, with the
> geometry of the snapshot determined by the filter primitive subregion for
> the feGaussianBlur, and performs processing on that, treating the boundaries
> of the snapshot as the boundary where boundary conditions are applied.
> or something else?
>

Concrete example:
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500">
<filter id="f1" filterUnits="userSpaceOnUse"
primitiveUnits="userSpaceOnUse">
  <feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" x="0"
y="0" width="100" height="100"/>
</filter>
<g filter="url(#f1)">
  <rect x="0" y="0" width="100" height="100" fill="#00ff00"/>
</g>
</svg>

Gecko 1.9 applies boundary conditions to the filter primitive subregion, so
it draws a solid 100x100 green box. Opera doesn't apply boundary conditions
at all so all four box edges are blurred. Another possible behaviour would
be to blur the right and bottom edges but treat the filter region as a
boundary so that the left and top edges stay solid.

What's the intent of the spec? I didn't write this Gecko code so I won't
mount a strong defense of its behaviour, but I can see that "restricting
calculation" to the filter primitive subregion could lead an implementor to
apply boundary conditions to the filter primitive subregion, since otherwise
you have to calculate over input pixels outside the filter primitive
subregion.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
Received on Monday, 12 May 2008 18:08:58 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:39 GMT