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 470615 of SVGGradientElement

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

Revision Content

SVG gradient interface

The SVGGradient interface is a base interface used by {{ domxref("SVGLinearGradientElement") }} and {{ domxref("SVGRadialGradientElement") }}.

Interface overview

Also implement {{ domxref("SVGElement") }}, {{ domxref("SVGURIReference") }}, {{ domxref("SVGExternalResourcesRequired") }}, {{ domxref("SVGStylable") }}, {{ domxref("SVGUnitTypes") }}
Methods None
Properties
  • readonly {{ domxref("SVGAnimatedEnumeration") }} gradientUnits
  • readonly {{ domxref("SVGAnimatedTransformList") }} gradientTransform
  • readonly {{ domxref("SVGAnimatedEnumeration") }} spreadMethod;
Constants
  • SVG_SPREADMETHOD_UNKNOWN = 0
  • SVG_SPREADMETHOD_PAD = 1
  • SVG_SPREADMETHOD_REFLECT = 2
  • SVG_SPREADMETHOD_REPEAT = 3
Normative document SVG 1.1 (2nd Edition)

Constants

Name Value Description
SVG_SPREADMETHOD_UNKNOWN 0 The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
SVG_SPREADMETHOD_PAD 1 Corresponds to value pad.
SVG_SPREADMETHOD_REFLECT 2 Corresponds to value reflect.
SVG_SPREADMETHOD_REPEAT 3 Corresponds to value repeat.

Properties

Name Type Description
gradientUnits {{ domxref("SVGAnimatedTransformList") }} Corresponds to attribute {{ SVGAttr("gradientUnits") }} on the given element. Takes one of the constants defined in {{ domxref("SVGUnitTypes") }}.
gradientTransform {{ domxref("SVGAnimatedTransformList") }} Corresponds to attribute {{ SVGAttr("gradientTransform") }} on the given element.
spreadMethod {{ domxref("SVGAnimatedTransformList") }} Corresponds to attribute {{ SVGAttr("spreadMethod") }} on the given element. One of the Spread Method Types defined on this interface.

Methods

The SVGGradientElement interface do not provide any specific methods.

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 {{ CompatNo() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

 

Revision Source

<h2 id="SVG_gradient_interface">SVG gradient interface</h2>
<p>The <code>SVGGradient</code> interface is a base interface used by {{ domxref("SVGLinearGradientElement") }} and {{ domxref("SVGRadialGradientElement") }}.</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("SVGExternalResourcesRequired") }}, {{ domxref("SVGStylable") }}, {{ domxref("SVGUnitTypes") }}</td>
    </tr>
    <tr>
      <th scope="row">Methods</th>
      <td><em>None</em></td>
    </tr>
    <tr>
      <th scope="row">Properties</th>
      <td>
        <ul>
          <li>readonly {{ domxref("SVGAnimatedEnumeration") }} <code>gradientUnits</code></li>
          <li>readonly {{ domxref("SVGAnimatedTransformList") }} <code>gradientTransform</code></li>
          <li>readonly {{ domxref("SVGAnimatedEnumeration") }} <code>spreadMethod</code>;</li>
        </ul>
      </td>
    </tr>
    <tr>
      <th scope="row">Constants</th>
      <td>
        <ul>
          <li><code>SVG_SPREADMETHOD_UNKNOWN</code> = 0</li>
          <li><code>SVG_SPREADMETHOD_PAD</code> = 1</li>
          <li><code>SVG_SPREADMETHOD_REFLECT</code> = 2</li>
          <li><code>SVG_SPREADMETHOD_REPEAT</code> = 3</li>
        </ul>
      </td>
    </tr>
    <tr>
      <th scope="row">Normative&nbsp;document</th>
      <td><a class="external" href="https://www.w3.org/TR/SVG11/pservers.html#InterfaceSVGGradientElement" title="https://www.w3.org/TR/SVG11/pservers.html#InterfaceSVGGradientElement">SVG 1.1 (2nd Edition)</a></td>
    </tr>
  </tbody>
</table>
<h2 id="Constants">Constants</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th>Name</th>
      <th>Value</th>
      <th>Description</th>
    </tr>
    <tr>
      <td><code>SVG_SPREADMETHOD_UNKNOWN</code></td>
      <td>0</td>
      <td>The type is not one of predefined types. It is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.</td>
    </tr>
    <tr>
      <td><code>SVG_SPREADMETHOD_PAD</code></td>
      <td>1</td>
      <td>Corresponds to value <em>pad</em>.</td>
    </tr>
    <tr>
      <td><code>SVG_SPREADMETHOD_REFLECT</code></td>
      <td>2</td>
      <td>Corresponds to value <em>reflect</em>.</td>
    </tr>
    <tr>
      <td><code>SVG_SPREADMETHOD_REPEAT</code></td>
      <td>3</td>
      <td>Corresponds to value <em>repeat</em>.</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>gradientUnits</code></td>
      <td>{{ domxref("SVGAnimatedTransformList") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("gradientUnits") }} on the given element. Takes one of the constants defined in {{ domxref("SVGUnitTypes") }}.</td>
    </tr>
    <tr>
      <td><code>gradientTransform</code></td>
      <td>{{ domxref("SVGAnimatedTransformList") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("gradientTransform") }} on the given element.</td>
    </tr>
    <tr>
      <td><code>spreadMethod</code></td>
      <td>{{ domxref("SVGAnimatedTransformList") }}</td>
      <td>Corresponds to attribute {{ SVGAttr("spreadMethod") }} on the given element. One of the Spread Method Types defined on this interface.</td>
    </tr>
  </tbody>
</table>
<h2 id="Methods">Methods</h2>
<p>The <code>SVGGradientElement</code> interface do not provide any specific methods.</p>
<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>{{ CompatNo() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<p>&nbsp;</p>
Revert to this revision