- From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
- Date: Tue, 7 Dec 2010 12:55:49 +0100
- To: www-svg@w3.org
Tavmjong Bah: > Hello Olaf, Hello, > > I have been tasked with responding to your email of 13 Jun 2010 > concerning the definition of the attribute type for the elements feFunc* > defined in: > > http://www.w3.org/TR/SVG11/filters.html#feComponentTransferTypeAttribute > > > (ISSUE-2338: http://www.w3.org/Graphics/SVG/WG/track/issues/2338 ). > > My proposed rewording of this section follows. Please let me know if > this rewording is satisfactory (your original email is at the bottom). > > Thanks, > > Tav > To resume, the changes are basically: a) use consequently n instead of undefined N - this is obviously ok b) add something useful for the case C = 1 - this looks ok as well Comments on two minor issues see below inline. The remaing question/problem indeed applies to several filter definitions. I think, it is not mentioned at all that one has to transform colours like '#abcdef' to three values, all from the interval [0, 1]. Missing this (because other chapters of SVG use other notations than channels for colours), the formulas in this chapter are a little bit confusing and it takes some time to guess, how to apply them. But to explain this or vocabulary like 'transparent black' is more an issue for the introduction, not for a specific filter section. So - ok for this section. If someone could have a critical look on undefined vocabulary like the relation of colour values to colour channels and something like 'transparent black' could improve the understandability of the filter chapter even more ;o) Does really no implementor have problems with this, or is it possible that some missing vocabulary could have been the source of some implementation bugs in the past? ;o) > ================================================== > > type = "identity | table | discrete | linear | gamma" > > Indicates the type of component transfer function. The type of > function determines the applicability of the other attributes. > > In the following, C is the initial component of what? For example for feFuncA it represents value of the alpha channel? For feFuncR it represents the red colour channel value... > , C' is the remapped > component; both in the closed interval [0, 1]. > > * For identity: > > C' = C > > * For table, the function is defined by linear interpolation between > values given in the attribute ‘tableValues’. The table has n+1 > values (i.e., v_0 to v_n) specifying the start and end values for > n evenly sized interpolation regions. Interpolations use the > following formula: > > For a value C < 1 find k such that: > > k/n <= C < (k+1)/n > > The result C' is given by: > > C' = v_k + (C - k/n)*n * (v_k+1 - v_k) > > If C = 1 then C' = v_n. > > * For discrete, the function is defined by the step function defined > by attribute ‘tableValues’, which provides a list of n values (i.e., > v0 to v_n-1) in order to identify a step function consisting of n > steps of the same width. The step function is defined by the > following formula: > > For a value C < 1 find k such that: > > k/n <= C < (k+1)/n > > The result C' is given by: > > C' = vk should be C' = v_k in your notation? > > If C = 1 then C' = v_n-1. > > * For linear, the function is defined by the following linear equation: > > C' = slope * C + intercept > > * For gamma, the function is defined by the following exponential > function: > > C' = amplitude * pow(C, exponent) + offset > > Best wishes Olaf
Received on Tuesday, 7 December 2010 11:56:28 UTC