1.1 --- a/filters/master/Filters.html Wed Aug 31 10:55:35 2011 +1000 1.2 +++ b/filters/master/Filters.html Wed Sep 07 10:26:03 2011 +1000 1.3 @@ -407,6 +407,18 @@ 1.4 </dd> 1.5 1.6 <dt> 1.7 + opacity(amount) 1.8 + </dt> 1.9 + <dd> 1.10 + Applies transparency to the samples in the input image. The value of 'amount' defines the proportion 1.11 + of the conversion. A value of 1 is completely transparent. A value of 0 leaves the 1.12 + input unchanged. Values between 0 and 1 are linear multipliers on the effect. 1.13 + This is equivalent to multiplying the input image samples by (1 - amount). 1.14 + If the 'amount' parameter is missing, a value of 1 is used. 1.15 + The markup equivalent of this function is <a href="#opacityEquivalent">given below</a>. 1.16 + </dd> 1.17 + 1.18 + <dt> 1.19 gamma(amplitude exponent offset) 1.20 </dt> 1.21 <dd> 1.22 @@ -1498,11 +1510,11 @@ 1.23 equivalent to the following matrix operation: 1.24 <p> 1.25 <object data="mathml/feColorMatrix01.mml" type="application/mathml+xml" width="100%" height="130"> 1.26 - <pre>| R' | |0.213+0.787s 0.715-0.715s 0.072-0.072s 0 0 | | R | 1.27 -| G' | |0.213-0.213s 0.715+0.285s 0.072-0.072s 0 0 | | G | 1.28 -| B' | = |0.213-0.213s 0.715-0.715s 0.072+0.928s 0 0 | * | B | 1.29 -| A' | | 0 0 0 1 0 | | A | 1.30 -| 1 | | 0 0 0 0 1 | | 1 |</pre> 1.31 + <pre>| R' | | (0.2127 + 0.7873s) (0.7152 - 0.7152s) (0.0722 - 0.0722s) 0 0 | | R | 1.32 +| G' | | (0.2127 - 0.2127s) (0.7152 + 0.2848s) (0.0722 - 0.0722s) 0 0 | | G | 1.33 +| B' | = | (0.2127 - 0.2127s) (0.7152 - 0.7152s) (0.0722 + 0.9278s) 0 0 | * | B | 1.34 +| A' | | 0 0 0 1 0 | | A | 1.35 +| 1 | | 0 0 0 0 1 | | 1 |</pre> 1.36 </object> 1.37 </p> 1.38 </li> 1.39 @@ -1523,21 +1535,23 @@ 1.40 where the terms a00, a01, etc. are calculated as follows: 1.41 <p> 1.42 <object data="mathml/feColorMatrix03.mml" type="application/mathml+xml" width="100%" height="230"> 1.43 - <pre>| a00 a01 a02 | [+0.213 +0.715 +0.072] 1.44 -| a10 a11 a12 | = [+0.213 +0.715 +0.072] + 1.45 -| a20 a21 a22 | [+0.213 +0.715 +0.072] 1.46 - [+0.787 -0.715 -0.072] 1.47 -cos(hueRotate value) * [-0.213 +0.285 -0.072] + 1.48 - [-0.213 -0.715 +0.928] 1.49 - [-0.213 -0.715+0.928] 1.50 -sin(hueRotate value) * [+0.143 +0.140-0.283] 1.51 - [-0.787 +0.715+0.072]</pre> 1.52 + <pre>| a00 a01 a02 | [0.2127 0.7152 0.0722] 1.53 +| a10 a11 a12 | = [0.2127 0.7152 0.0722] + 1.54 +| a20 a21 a22 | [0.2127 0.7152 0.0722] 1.55 + 1.56 + [ 0.7873 -0.7152 -0.0722] 1.57 + cos(hueRotate value) * [-0.2127 0.2848 -0.0722] + 1.58 + [-0.2127 -0.7152 0.9278] 1.59 + 1.60 + [-0.2127 -0.7152 0.9278] 1.61 + sin(hueRotate value) * [ 0.143 0.140 -0.283 ] 1.62 + [-0.7873 0.7152 0.0722]</pre> 1.63 </object> 1.64 </p> 1.65 Thus, the upper left term of the hue matrix turns out to be: 1.66 <p> 1.67 <object data="mathml/feColorMatrix04.mml" type="application/mathml+xml" width="100%" height="30"> 1.68 - <pre>.213 + cos(hueRotate value)*.787 - sin(hueRotate value)*.213</pre> 1.69 + <pre>.2127 + cos(hueRotate value) * 0.7873 - sin(hueRotate value) * 0.2127</pre> 1.70 </object> 1.71 </p> 1.72 1.73 @@ -1551,7 +1565,7 @@ 1.74 <pre> | R' | | 0 0 0 0 0 | | R | 1.75 | G' | | 0 0 0 0 0 | | G | 1.76 | B' | = | 0 0 0 0 0 | * | B | 1.77 - | A' | | 0.2125 0.7154 0.0721 0 0 | | A | 1.78 + | A' | | 0.2127 0.7152 0.0722 0 0 | | A | 1.79 | 1 | | 0 0 0 0 1 | | 1 |</pre> 1.80 </object> 1.81 </p> 1.82 @@ -3614,9 +3628,9 @@ 1.83 1.84 <pre class="examplesource"> <filter id="grayscale"> 1.85 <feColorMatrix type="matrix" 1.86 - values="(0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 1.87 - (0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 1.88 - (0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0 1.89 + values="(0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 1.90 + (0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 1.91 + (0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0 1.92 0 0 0 1 0"/> 1.93 </filter> </pre> 1.94 1.95 @@ -3654,6 +3668,14 @@ 1.96 </feComponentTransfer> 1.97 </filter> </pre> 1.98 1.99 +<h3 id="opacityEquivalent">opacity</h3> 1.100 + 1.101 +<pre class="examplesource"> <filter id="opacity"> 1.102 + <feComponentTransfer> 1.103 + <feFuncA type="table" tableValues="0 [amount]"/> 1.104 + </feComponentTransfer> 1.105 + </filter> </pre> 1.106 + 1.107 <h3 id="gammaEquivalent">gamma</h3> 1.108 1.109 <pre class="examplesource"> <filter id="gamma">