On Mon, Jun 14, 2010 at 12:26 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
> In Firefox, a blur with radius 'Npx' increases the size of the blurred
> object's (in terms of pixels affected) by exactly N CSS pixels in each
> direction ... if you ignore the effects of rounding. In practice, for large
> values of N, rounding causes pixels near the edge of the shadow to not
> change. I think this is a good way to interpret the radius and the word
> 'radius' is a reasonable term for this value.
>
> For the record, our blurring algorithm uses three passes of a box filter,
> similar to what's described here:
> http://www.w3.org/TR/SVG/filters.html#feGaussianBlur. We round the blur
> radius down to the nearest device pixel and then choose three (integer) box
> lobe sizes that add up to the blur radius while being roughly equal. This is
> slightly tricky. The exact algorithm is in ComputeLobes here:
>
> http://mxr.mozilla.org/mozilla-central/source/gfx/src/thebes/utils/gfxBlur.cpp#264
>
Hmm, I see that the spec has been changed so that we're supposed to blur
inside the shadow edge as well as outside. I guess that makes some kind of
sense.
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]