W3C home > Mailing lists > Public > www-style@w3.org > June 2010

Re: [css3-background] vastly different takes on "blur"

From: Robert O'Callahan <robert@ocallahan.org>
Date: Mon, 14 Jun 2010 13:34:34 +1200
Message-ID: <AANLkTimYDDyc_6Tq9hdUFC5LcqYwMIlNKCYvw-z_Ox_f@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, Simon Fraser <smfr@me.com>, "L. David Baron" <dbaron@dbaron.org>, Brian Manthos <brianman@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
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]
Received on Monday, 14 June 2010 01:35:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:28 GMT