filter

  • Revision slug: SVG/Element/filter
  • Revision title: filter
  • Revision id: 57081
  • Created:
  • Creator: Manuel_Strehl
  • Is current revision? No
  • Comment add compat table; 85 words added

Revision Content

{{ SVGRefElem() }}

The filter element serves as container for atomic filter operations. It is never rendered directly. A filter is referenced by using the {{ SVGAttr("filter") }} attribute on the target SVG element.

Usage context

Categories None
Permitted content Any number of the following elements, in any order:
descriptive elements »
filter primitive elements »
{{ SVGElement("animate") }}, {{ SVGElement("set") }}
Normative document SVG 1.1 (2nd Edition)

Example

Attributes

Global attributes

Specific attributes

  • {{ SVGAttr("x") }}
  • {{ SVGAttr("y") }}
  • {{ SVGAttr("width") }}
  • {{ SVGAttr("height") }}
  • {{ SVGAttr("filterRes") }}
  • {{ SVGAttr("filterUnits") }}
  • {{ SVGAttr("primitiveUnits") }}
  • {{ SVGAttr("xlink:href") }}

DOM Interface

This element implements the SVGFilterElement interface.

Browser compatibility

{{ CompatibilityTable() }}

{{ CompatTableDesktop(['Basic Support', CompatChrome('1.0') .. '[1]', CompatGeckoDesktop('2.0'), CompatIE('10.0'), CompatPrestoOpera('2.0'), CompatSafari('3.0') .. '[1]']) }} {{ CompatTableMobile(['Basic Support', CompatUnknown(), CompatGeckoMobile('2.0'), CompatNo(), CompatPrestoMobile('2.0'), CompatSafari('3.0') .. '[1]']) }}

[1] There remain some issues in Webkit browsers.

See also

  • {{ SVGElement("feBlend") }}
  • {{ SVGElement("feColorMatrix") }}
  • {{ SVGElement("feComponentTransfer") }}
  • {{ SVGElement("feComposite") }}
  • {{ SVGElement("feConvolveMatrix") }}
  • {{ SVGElement("feDiffuseLighting") }}
  • {{ SVGElement("feDisplacementMap") }}
  • {{ SVGElement("feFlood") }}
  • {{ SVGElement("feGaussianBlur") }}
  • {{ SVGElement("feImage") }}
  • {{ SVGElement("feMerge") }}
  • {{ SVGElement("feMorphology") }}
  • {{ SVGElement("feOffset") }}
  • {{ SVGElement("feSpecularLighting") }}
  • {{ SVGElement("feTile") }}
  • {{ SVGElement("feTurbulence") }}
  • SVG tutorial: Filter effects

Revision Source

<p>{{ SVGRefElem() }}</p>
<p>The <code>filter</code> element serves as container for atomic filter operations. It is never rendered directly. A filter is referenced by using the {{ SVGAttr("filter") }} attribute on the target SVG element.</p>
<h2>Usage context</h2>
<table class="standard-table"> <tbody> <tr> <th scope="row">Categories</th> <td><em>None</em></td> </tr> <tr> <th scope="row">Permitted content</th> <td>Any number of the following elements, in any order:<br> <a href="/en/SVG/Element#Descriptive" title="en/SVG/Element#Descriptive">descriptive elements</a> »<br> <a href="/en/SVG/Element#Filter" title="en/SVG/Element#Filter">filter primitive elements</a> »<br> {{ SVGElement("animate") }}, {{ SVGElement("set") }}</td> </tr> <tr> <th scope="row">Normative document</th> <td><a class="external" href="http://www.w3.org/TR/SVG/filters.html#FilterElement" title="http://www.w3.org/TR/SVG/filters.html#FilterElement">SVG 1.1 (2nd Edition)</a></td> </tr> </tbody>
</table>
<h2>Example</h2>
<h2>Attributes</h2>
<h3>Global attributes</h3>
<ul> <li><a href="/en/SVG/Attribute#Core" title="en/SVG/Attribute#Core">Core attributes</a> »</li> <li><a href="/en/SVG/Attribute#Presentation" title="en/SVG/Attribute#Presentation">Presentation attributes</a> »</li> <li><a href="/en/SVG/Attribute#XLink" title="en/SVG/Attribute#XLink">XLink attributes</a> »</li> <li>{{ SVGAttr("class") }}</li> <li>{{ SVGAttr("style") }}</li> <li>{{ SVGAttr("externalResourcesRequired") }}</li>
</ul>
<h3>Specific attributes</h3>
<ul> <li>{{ SVGAttr("x") }}</li> <li>{{ SVGAttr("y") }}</li> <li>{{ SVGAttr("width") }}</li> <li>{{ SVGAttr("height") }}</li> <li>{{ SVGAttr("filterRes") }}</li> <li>{{ SVGAttr("filterUnits") }}</li> <li>{{ SVGAttr("primitiveUnits") }}</li> <li>{{ SVGAttr("xlink:href") }}</li>
</ul>
<h2>DOM Interface</h2>
<p>This element implements the <code><a href="/en/DOM/SVGFilterElement" title="en/DOM/SVGFilterElement">SVGFilterElement</a></code> interface.</p>
<h2>Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<p>{{ CompatTableDesktop(['Basic Support', CompatChrome('1.0') .. '<a href="#compatWebkit">[1]</a>', CompatGeckoDesktop('2.0'), CompatIE('10.0'), CompatPrestoOpera('2.0'), CompatSafari('3.0') .. '<a href="#compatWebkit">[1]</a>']) }} {{ CompatTableMobile(['Basic Support', CompatUnknown(), CompatGeckoMobile('2.0'), CompatNo(), CompatPrestoMobile('2.0'), CompatSafari('3.0') .. '<a href="#compatWebkit">[1]</a>']) }}</p>
<p id="compatWebkit">[1] There remain <a class=" link-https" href="https://bugs.webkit.org/show_bug.cgi?id=26389">some issues</a> in Webkit browsers.</p><h2>See also</h2>
<ul> <li>{{ SVGElement("feBlend") }}</li> <li>{{ SVGElement("feColorMatrix") }}</li> <li>{{ SVGElement("feComponentTransfer") }}</li> <li>{{ SVGElement("feComposite") }}</li> <li>{{ SVGElement("feConvolveMatrix") }}</li> <li>{{ SVGElement("feDiffuseLighting") }}</li> <li>{{ SVGElement("feDisplacementMap") }}</li> <li>{{ SVGElement("feFlood") }}</li> <li>{{ SVGElement("feGaussianBlur") }}</li> <li>{{ SVGElement("feImage") }}</li> <li>{{ SVGElement("feMerge") }}</li> <li>{{ SVGElement("feMorphology") }}</li> <li>{{ SVGElement("feOffset") }}</li> <li>{{ SVGElement("feSpecularLighting") }}</li> <li>{{ SVGElement("feTile") }}</li> <li>{{ SVGElement("feTurbulence") }}</li> <li><a href="/en/SVG/Tutorial/Filter_effects" title="en/SVG/Tutorial/Filter_effects">SVG tutorial: Filter effects</a></li>
</ul>
Revert to this revision