- From: Alan Stearns <stearns@adobe.com>
- Date: Wed, 11 Sep 2013 08:43:52 -0700
- To: "L. David Baron" <dbaron@dbaron.org>, "www-style@w3.org" <www-style@w3.org>
On 9/11/13 8:22 AM, "L. David Baron" <dbaron@dbaron.org> wrote: >http://dev.w3.org/csswg/css-shapes/#shape-image-threshold-property >says: > # <alphavalue> > # A <number> value used to set the threshold used for extracting > # a shape from an image. Any values outside the range 0.0 (fully > # transparent) to 1.0 (fully opaque) will be clamped to this > # range. > >which isn't clear about whether you're looking for pixels that are >greater than ( > ) the alphavalue or greater than or equal ( >= ) to >the alphavalue. > >There is an example earlier: > # A value of 0.5 means that the shape will enclose all the pixels > # that are more than 50% opaque. >which suggests that it's greater than ( > ). It is greater than ( > ). This is defined in the first paragraph of section 3.3. I'll add it to the <alphavalue> definition to make sure there's no possible misinterpretation. > >I tend to think it's actually preferable for it to be a >=, because >then 0.0 is useful as a default value that has the current behavior >(no image shape threshold) since all image pixels have an opacity >that are >= 0. The initial value as 0.0 is useful because that will construct a shape that encloses all of the pixels that are not fully transparent, which is the basic use case for a shape from alpha data. A shape constructed from all of the image pixels isn't any different than a rectangle enclosing the image's content area, so it would not be a useful default. > >I think the alternative ( > ) doesn't seem as useful because: > * using >, the 1.0 value doesn't seem useful (no shape, always) Either 1.0 or 0.0 is going to be strange, depending on whether we pick > or >=. I chose to have 1.0 be strange (no shape). The other way forces an author to choose some amount of precision in a 0.0001 value to enclose all of the not-fully-transparent pixels. > * the Initial value doesn't describe the current behavior, so > another value would be needed The intended behavior is for the 0.0 initial value to enclose all of the pixels that are not fully transparent. I want that to be the behavior of the initial value, and I don't think picking an arbitrary amount of decimals for a 0.0001 initial value is a good idea. Thanks, Alan
Received on Wednesday, 11 September 2013 15:44:20 UTC