Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 470595 of SVGFilterElement

  • Revision slug: Web/API/SVGFilterElement
  • Revision title: SVGFilterElement
  • Revision id: 470595
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Updated tags

Revision Content

SVG Filter DOM interface

The SVGFilterElement interface provides access to the properties of {{ SVGElement("filter") }} elements, as well as methods to manipulate them.

Interface overview

Also implement {{ domxref("SVGElement") }}, {{ domxref("SVGURIReference") }}, {{ domxref("SVGLangSpace") }}, {{ domxref("SVGExternalResourcesRequired") }}, {{ domxref("SVGStylable") }}, {{ domxref("SVGUnitTypes") }}
Methods
  • void setFilterRes(in unsigned long filterResX, in unsigned long filterResY)
Properties
  • readonly {{ domxref("SVGAnimatedEnumeration") }} filterUnits
  • readonly {{ domxref("SVGAnimatedEnumeration") }} primitiveUnits
  • readonly {{ domxref("SVGAnimatedLength") }} x
  • readonly {{ domxref("SVGAnimatedLength") }} y
  • readonly {{ domxref("SVGAnimatedLength") }} width
  • readonly {{ domxref("SVGAnimatedLength") }} height
  • readonly {{ domxref("SVGAnimatedInteger") }} filterResX
  • readonly {{ domxref("SVGAnimatedInteger") }} filterResY
Normative document SVG 1.1 (2nd Edition)

Properties

Name Type Description
filterUnits {{ domxref("SVGAnimatedEnumeration") }} Corresponds to attribute {{ SVGAttr("filterUnits") }} on the given {{ SVGElement("filter") }} element. Takes one of the constants defined in {{ domxref("SVGUnitTypes") }}.
primitiveUnits {{ domxref("SVGAnimatedEnumeration") }} Corresponds to attribute {{ SVGAttr("primitiveUnits") }} on the given {{ SVGElement("filter") }} element. Takes one of the constants defined in {{ domxref("SVGUnitTypes") }}.
x {{ domxref("SVGAnimatedLength") }} Corresponds to attribute {{ SVGAttr("x") }} on the given {{ SVGElement("filter") }} element.
y {{ domxref("SVGAnimatedLength") }} Corresponds to attribute {{ SVGAttr("y") }} on the given {{ SVGElement("filter") }} element.
width {{ domxref("SVGAnimatedLength") }} Corresponds to attribute {{ SVGAttr("width") }} on the given {{ SVGElement("filter") }} element.
height {{ domxref("SVGAnimatedLength") }} Corresponds to attribute {{ SVGAttr("height") }} on the given {{ SVGElement("filter") }} element.
filterResX {{ domxref("SVGAnimatedInteger") }} Contains the X component of attribute {{ SVGAttr("filterRes") }} on the given {{ SVGElement("filter") }} element.
filterResY {{ domxref("SVGAnimatedInteger") }} Contains the Y component of attribute {{ SVGAttr("filterRes") }} on the given {{ SVGElement("filter") }} element.

Methods

Name & Arguments Return Description
setFilterRes(in unsigned long filterResX, in unsigned long filterResY) void Sets the values for attribute {{ SVGAttr("filterRes") }}.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • {{ SVGElement("filter") }} SVG Element

Revision Source

<h2 id="SVG_Filter_DOM_interface">SVG Filter DOM interface</h2>
<p>The <code>SVGFilterElement</code> interface provides access to the properties of {{ SVGElement("filter") }} elements, as well as methods to manipulate them.</p>
<h3 id="Interface_overview">Interface overview</h3>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="row">Also&nbsp;implement</th>
      <td>{{ domxref("SVGElement") }}, {{ domxref("SVGURIReference") }}, {{ domxref("SVGLangSpace") }}, {{ domxref("SVGExternalResourcesRequired") }}, {{ domxref("SVGStylable") }}, {{ domxref("SVGUnitTypes") }}</td>
    </tr>
    <tr>
      <th scope="row">Methods</th>
      <td>
        <ul>
          <li><code>void setFilterRes(in unsigned long filterResX, in unsigned long filterResY)</code></li>
        </ul>
      </td>
    </tr>
    <tr>
      <th scope="row">Properties</th>
      <td>
        <ul>
          <li>readonly {{ domxref("SVGAnimatedEnumeration") }} <code>filterUnits</code></li>
          <li>readonly {{ domxref("SVGAnimatedEnumeration") }} <code>primitiveUnits</code></li>
          <li>readonly {{ domxref("SVGAnimatedLength") }} <code>x</code></li>
          <li>readonly {{ domxref("SVGAnimatedLength") }} <code>y</code></li>
          <li>readonly {{ domxref("SVGAnimatedLength") }} <code>width</code></li>
          <li>readonly {{ domxref("SVGAnimatedLength") }} <code>height</code></li>
          <li>readonly {{ domxref("SVGAnimatedInteger") }} <code>filterResX</code></li>
          <li>readonly {{ domxref("SVGAnimatedInteger") }} <code>filterResY</code></li>
        </ul>
      </td>
    </tr>
    <tr>
      <th scope="row">Normative&nbsp;document</th>
      <td><a class="external" href="https://www.w3.org/TR/SVG11/shapes.html#InterfaceSVGEllipseElement" title="https://www.w3.org/TR/SVG11/shapes.html#InterfaceSVGEllipseElement">SVG 1.1 (2nd Edition)</a></td>
    </tr>
  </tbody>
</table>
<h2 id="Properties">Properties</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code>filterUnits</code></td>
      <td>{{ domxref("SVGAnimatedEnumeration") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("filterUnits") }} on the given {{ SVGElement("filter") }} element. Takes one of the constants defined in {{ domxref("SVGUnitTypes") }}.</td>
    </tr>
    <tr>
      <td><code>primitiveUnits</code></td>
      <td>{{ domxref("SVGAnimatedEnumeration") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("primitiveUnits") }} on the given {{ SVGElement("filter") }} element. Takes one of the constants defined in {{ domxref("SVGUnitTypes") }}.</td>
    </tr>
    <tr>
      <td><code>x</code></td>
      <td>{{ domxref("SVGAnimatedLength") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("x") }} on the given {{ SVGElement("filter") }} element.</td>
    </tr>
    <tr>
      <td><code>y</code></td>
      <td>{{ domxref("SVGAnimatedLength") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("y") }} on the given {{ SVGElement("filter") }} element.</td>
    </tr>
    <tr>
      <td><code>width</code></td>
      <td>{{ domxref("SVGAnimatedLength") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("width") }} on the given {{ SVGElement("filter") }} element.</td>
    </tr>
    <tr>
      <td><code>height</code></td>
      <td>{{ domxref("SVGAnimatedLength") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("height") }} on the given {{ SVGElement("filter") }} element.</td>
    </tr>
    <tr>
      <td><code>filterResX</code></td>
      <td>{{ domxref("SVGAnimatedInteger") }}</td>
      <td>Contains the X component of attribute {{ SVGAttr("filterRes") }} on the given {{ SVGElement("filter") }} element.</td>
    </tr>
    <tr>
      <td><code>filterResY</code></td>
      <td>{{ domxref("SVGAnimatedInteger") }}</td>
      <td>Contains the Y component of attribute {{ SVGAttr("filterRes") }} on the given {{ SVGElement("filter") }} element.</td>
    </tr>
  </tbody>
</table>
<h2 id="Methods">Methods</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th>Name &amp; Arguments</th>
      <th>Return</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code><strong>setFilterRes</strong>(</code><code>in unsigned long <em>filterResX</em>, in unsigned long <em>filterResY</em></code><code>)</code></td>
      <td><em>void</em></td>
      <td>Sets the values for attribute {{ SVGAttr("filterRes") }}.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>{{ SVGElement("filter") }} SVG Element</li>
</ul>
Revert to this revision