- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 13 Jul 2010 18:11:45 -0700
- To: "L. David Baron" <dbaron@dbaron.org>
- Cc: www-style@w3.org
On Tue, Jul 13, 2010 at 5:24 PM, L. David Baron <dbaron@dbaron.org> wrote: > On Wednesday 2010-07-14 02:06 +0200, Bjoern Hoehrmann wrote: >> David is just arguing to prefer re-use over re-invention. If there is >> some well-known mechanism, and that mechanism is described using well- >> known terms, then it is preferable to use that mechanism and describe >> it in those terms, over coming up with new, unproven mechanisms and >> terms, unless that is shown to be necessary. He is not arguing to de- >> fine something by saying "Do this like Photoshop does that", or "Do >> this as if you were using Cairo and called function X and then Y.". >> >> At least as I understand him, there is no reason to expect readers of >> the specification will have difficulty predicting the dimensions of >> the shadow knowing the radius parameter and the specification but not >> some particular graphics library, due to following the advice above. > > Yes, that's what I was trying to say. > > See, for example, http://en.wikipedia.org/wiki/Gaussian_blur , which > uses the term "radius" as the characteristic of a blur twice, but > doesn't use the term "distance" as the characteristic of a blur > (though it does use "distance" in other contexts). That article > doesn't, however, explain how the radius relates to the σ of the > Gaussian function. > > (I'm not saying "radius" is the only term already in use. > http://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement > describes blurs in terms of the standard deviation of the Gaussian > function.) I was just looking at the Wikipedia article, actually. Note that, though it uses the term "radius" in its description a few times (actually, only in a single paragraph describing the effects of applying multiple gaussian blurs), there is nothing that looks like a "radius" in any of the actual technical descriptions. As near as I can tell, the concept that we're calling "radius" is approximately triple the stdev term in the Gaussian equation. I don't know how individual graphics libraries expose their gaussian blur ability, though, so I don't know what sort of approximation would be best to give. Even if I did, it still wouldn't mean anything to an author - the number who know what a stdev is beyond "something I heard about in Stat" is pretty small. By instead giving clear and simple rules on what must happen, based on the properties of the blur that authors actually understand (like the width of the area that is noticeably affected by the blur, or half that), we ensure that the number that authors can easily map the number they put in the CSS property to the intended visual effect. Implementors are smart people. They can reverse that value into something more suited for their particular implementation (like dividing it by 3 to get a variance, or similar) without the spec having to tell them precisely what they need to do. ~TJ
Received on Wednesday, 14 July 2010 01:12:37 UTC