filters/publish/Filters.html

changeset 36
b31bb9367aef
parent 35
31e848f19ceb
child 40
3f1fdd4a8004
     1.1 --- a/filters/publish/Filters.html	Wed Aug 31 10:55:35 2011 +1000
     1.2 +++ b/filters/publish/Filters.html	Wed Sep 07 10:26:03 2011 +1000
     1.3 @@ -14,7 +14,7 @@
     1.4  <div class="head">
     1.5    <p><a href="http://www.w3.org/"><img height="48" width="72" alt="W3C" src="http://www.w3.org/Icons/w3c_home"/></a></p>
     1.6    <h1 id="pagetitle">Filter Effects 1.0: Language</h1>
     1.7 -  <h2 id="pagesubtitle">W3C Editor’s Draft <em>31 August 2011</em></h2>
     1.8 +  <h2 id="pagesubtitle">W3C Editor’s Draft <em>07 September 2011</em></h2>
     1.9    <dl><dt>This version:</dt><dd><a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/Filters.html" class="url">https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/publish/Filters.html</a></dd><dt>Latest version:</dt><dd><a href="http://www.w3.org/TR/FilterEffects10/" class="url">http://www.w3.org/TR/FilterEffects10/</a></dd><dt>Previous version:</dt><dd><a href="http://www.w3.org/TR/2007/WD-SVGFilter12-20070501/" class="url">http://www.w3.org/TR/2007/WD-SVGFilter12-20070501/</a></dd><dt>Editors:</dt><dd><a href="mailto:ed@opera.com">Erik Dahlström</a>, (<a href="http://www.opera.com/">Opera Software ASA</a>)</dd><dd><a href="mailto:dino@apple.com">Dean Jackson</a> (<a href="http://www.apple.com/">Apple Inc</a>)</dd><dt>Authors:</dt><dd>The authors of this specification are the participants of the W3C SVG and CSS Working Groups.</dd></dl>
    1.10    <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2011 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p>
    1.11  </div>
    1.12 @@ -142,10 +142,11 @@
    1.13  <li><a href="#saturateEquivalent">32.3 saturate</a></li>
    1.14  <li><a href="#huerotateEquivalent">32.4 hue-rotate</a></li>
    1.15  <li><a href="#invertEquivalent">32.5 invert</a></li>
    1.16 -<li><a href="#gammaEquivalent">32.6 gamma</a></li>
    1.17 -<li><a href="#blurEquivalent">32.7 blur</a></li>
    1.18 -<li><a href="#sharpenEquivalent">32.8 sharpen</a></li>
    1.19 -<li><a href="#dropshadowEquivalent">32.9 drop-shadow</a></li></ul></li>
    1.20 +<li><a href="#opacityEquivalent">32.6 opacity</a></li>
    1.21 +<li><a href="#gammaEquivalent">32.7 gamma</a></li>
    1.22 +<li><a href="#blurEquivalent">32.8 blur</a></li>
    1.23 +<li><a href="#sharpenEquivalent">32.9 sharpen</a></li>
    1.24 +<li><a href="#dropshadowEquivalent">32.10 drop-shadow</a></li></ul></li>
    1.25  <li><a href="#DOMInterfaces">33 DOM interfaces</a><ul class="toc">
    1.26  <li><a href="#InterfaceImageData">33.1 Interface ImageData</a></li>
    1.27  <li><a href="#InterfaceSVGFilterElement">33.2 Interface SVGFilterElement</a></li>
    1.28 @@ -394,6 +395,15 @@
    1.29      If the 'amount' parameter is missing, a value of 1 is used.
    1.30      The markup equivalent of this function is <a href="#invertEquivalent">given below</a>.
    1.31    </dd><dt>
    1.32 +    opacity(amount)
    1.33 +  </dt><dd>
    1.34 +    Applies transparency to the samples in the input image. The value of 'amount' defines the proportion
    1.35 +    of the conversion. A value of 1 is completely transparent. A value of 0 leaves the
    1.36 +    input unchanged. Values between 0 and 1 are linear multipliers on the effect.
    1.37 +    This is equivalent to multiplying the input image samples by (1 - amount).
    1.38 +    If the 'amount' parameter is missing, a value of 1 is used.
    1.39 +    The markup equivalent of this function is <a href="#opacityEquivalent">given below</a>.
    1.40 +  </dd><dt>
    1.41      gamma(amplitude exponent offset)
    1.42    </dt><dd>
    1.43      Applies a gamma function to the input image. 
    1.44 @@ -1369,11 +1379,11 @@
    1.45            equivalent to the following matrix operation: 
    1.46        <p>
    1.47        <object data="mathml/feColorMatrix01.mml" type="application/mathml+xml" width="100%" height="130">
    1.48 -          <pre>| R' |     |0.213+0.787s  0.715-0.715s  0.072-0.072s 0  0 |   | R |
    1.49 -| G' |     |0.213-0.213s  0.715+0.285s  0.072-0.072s 0  0 |   | G |
    1.50 -| B' |  =  |0.213-0.213s  0.715-0.715s  0.072+0.928s 0  0 | * | B |
    1.51 -| A' |     |           0            0             0  1  0 |   | A |
    1.52 -| 1  |     |           0            0             0  0  1 |   | 1 |</pre>
    1.53 +          <pre>| R' |     | (0.2127 + 0.7873s)  (0.7152 - 0.7152s)  (0.0722 - 0.0722s) 0  0 |   | R |
    1.54 +| G' |     | (0.2127 - 0.2127s)  (0.7152 + 0.2848s)  (0.0722 - 0.0722s) 0  0 |   | G |
    1.55 +| B' |  =  | (0.2127 - 0.2127s)  (0.7152 - 0.7152s)  (0.0722 + 0.9278s) 0  0 | * | B |
    1.56 +| A' |     |           0                   0                   0        1  0 |   | A |
    1.57 +| 1  |     |           0                   0                   0        0  1 |   | 1 |</pre>
    1.58        </object>
    1.59      </p>
    1.60          </li><li>For <span class="attr-value">type="hueRotate"</span>, <span class="attr-name">values</span> is a single one real number value
    1.61 @@ -1392,21 +1402,23 @@
    1.62            where the terms a00, a01, etc. are calculated as follows: 
    1.63        <p>
    1.64      <object data="mathml/feColorMatrix03.mml" type="application/mathml+xml" width="100%" height="230">
    1.65 -          <pre>| a00 a01 a02 |    [+0.213 +0.715 +0.072]
    1.66 -| a10 a11 a12 | =  [+0.213 +0.715 +0.072] +
    1.67 -| a20 a21 a22 |    [+0.213 +0.715 +0.072]
    1.68 -                        [+0.787 -0.715 -0.072]
    1.69 -cos(hueRotate value) *  [-0.213 +0.285 -0.072] +
    1.70 -                        [-0.213 -0.715 +0.928]
    1.71 -                        [-0.213 -0.715+0.928]
    1.72 -sin(hueRotate value) *  [+0.143 +0.140-0.283]
    1.73 -                        [-0.787 +0.715+0.072]</pre>
    1.74 +          <pre>| a00 a01 a02 |     [0.2127 0.7152 0.0722]
    1.75 +| a10 a11 a12 | =   [0.2127 0.7152 0.0722] +
    1.76 +| a20 a21 a22 |     [0.2127 0.7152 0.0722]
    1.77 +
    1.78 +                                            [ 0.7873 -0.7152 -0.0722]
    1.79 +                    cos(hueRotate value) *  [-0.2127  0.2848 -0.0722] +
    1.80 +                                            [-0.2127 -0.7152  0.9278]
    1.81 +
    1.82 +                                            [-0.2127 -0.7152  0.9278]
    1.83 +                    sin(hueRotate value) *  [ 0.143   0.140  -0.283 ]
    1.84 +                                            [-0.7873  0.7152  0.0722]</pre>
    1.85      </object>
    1.86      </p>
    1.87            Thus, the upper left term of the hue matrix turns out to be:
    1.88        <p>
    1.89      <object data="mathml/feColorMatrix04.mml" type="application/mathml+xml" width="100%" height="30"> 
    1.90 -          <pre>.213 + cos(hueRotate value)*.787 - sin(hueRotate value)*.213</pre>
    1.91 +          <pre>.2127 + cos(hueRotate value) * 0.7873 - sin(hueRotate value) * 0.2127</pre>
    1.92        </object>
    1.93        </p>
    1.94  
    1.95 @@ -1418,7 +1430,7 @@
    1.96            <pre>   | R' |     |      0        0        0  0  0 |   | R |
    1.97     | G' |     |      0        0        0  0  0 |   | G |
    1.98     | B' |  =  |      0        0        0  0  0 | * | B |
    1.99 -   | A' |     | 0.2125   0.7154   0.0721  0  0 |   | A |
   1.100 +   | A' |     | 0.2127   0.7152   0.0722  0  0 |   | A |
   1.101     | 1  |     |      0        0        0  0  1 |   | 1 |</pre>
   1.102     </object>
   1.103     </p>
   1.104 @@ -3545,9 +3557,9 @@
   1.105  
   1.106  <pre class="examplesource"> &lt;filter id="grayscale"&gt;
   1.107      &lt;feColorMatrix type="matrix"
   1.108 -               values="(0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0
   1.109 -                       (0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0
   1.110 -                       (0.2125 * [amount]) (0.7154 * [amount]) (0.0721 * [amount]) 0 0
   1.111 +               values="(0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0
   1.112 +                       (0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0
   1.113 +                       (0.2127 * [amount]) (0.7152 * [amount]) (0.0722 * [amount]) 0 0
   1.114                         0 0 0 1 0"/&gt;
   1.115    &lt;/filter&gt; </pre>
   1.116  
   1.117 @@ -3585,7 +3597,15 @@
   1.118      &lt;/feComponentTransfer&gt;
   1.119    &lt;/filter&gt; </pre>
   1.120  
   1.121 -<h3 id="gammaEquivalent">32.6 gamma</h3>
   1.122 +<h3 id="opacityEquivalent">32.6 opacity</h3>
   1.123 +
   1.124 +<pre class="examplesource"> &lt;filter id="opacity"&gt;
   1.125 +    &lt;feComponentTransfer&gt;
   1.126 +        &lt;feFuncA type="table" tableValues="0 [amount]"/&gt;
   1.127 +    &lt;/feComponentTransfer&gt;
   1.128 +  &lt;/filter&gt; </pre>
   1.129 +
   1.130 +<h3 id="gammaEquivalent">32.7 gamma</h3>
   1.131  
   1.132  <pre class="examplesource"> &lt;filter id="gamma"&gt;
   1.133      &lt;feComponentTransfer&gt;
   1.134 @@ -3595,19 +3615,19 @@
   1.135      &lt;/feComponentTransfer&gt;
   1.136    &lt;/filter&gt; </pre>
   1.137  
   1.138 -<h3 id="blurEquivalent">32.7 blur</h3>
   1.139 +<h3 id="blurEquivalent">32.8 blur</h3>
   1.140  
   1.141  <pre class="examplesource"> &lt;filter id="blur"&gt;
   1.142      &lt;feGaussianBlur stdDeviation="[radiusX radiusY]"&gt;
   1.143    &lt;/filter&gt; </pre>
   1.144  
   1.145 -<h3 id="sharpenEquivalent">32.8 sharpen</h3>
   1.146 +<h3 id="sharpenEquivalent">32.9 sharpen</h3>
   1.147  
   1.148  <pre class="examplesource"> &lt;filter id="unsharp"&gt;
   1.149      &lt;feUnsharpMask stdDeviation="[radius]" threshold="[threshold]" amount="[amount]"&gt;
   1.150    &lt;/filter&gt; </pre>
   1.151  
   1.152 -<h3 id="dropshadowEquivalent">32.9 drop-shadow</h3>
   1.153 +<h3 id="dropshadowEquivalent">32.10 drop-shadow</h3>
   1.154  
   1.155  <pre class="examplesource"> &lt;filter id="drop-shadow"&gt;
   1.156      &lt;feGaussianBlur in="[alpha-channel-of-input]" stdDeviation="[radius]"/&gt;

mercurial