k2

  • Revision slug: Web/SVG/Attribute/k2
  • Revision title: k2
  • Revision id: 427227
  • Created:
  • Creator: Jeremie
  • Is current revision? Yes
  • Comment Moved From SVG/Attribute/k2 to Web/SVG/Attribute/k2

Revision Content

« SVG Attribute reference home

The k2 attribute defines one of the value to be used within the the arithmetic operation of the {{SVGElement("feComposite")}} filter primitive. If this attribute is not set, its default value is 0.

The pixel composition is computed using the following formula:

result = k1*i1*i2 + k2*i1 + k3*i2 + k4

Usage context

Categories None
Value <number>
Animatable Yes
Normative document SVG 1.1 (2nd Edition)

Example

Elements

The following elements can use the k2 attribute

  • {{ SVGElement("feComposite") }}

Revision Source

<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG Attribute reference home</a></p>
<p>The <code>k2</code> attribute defines one of the value to be used within the the <code>arithmetic</code> operation of the {{SVGElement("feComposite")}} filter primitive. If this attribute is not set, its default value is <strong>0</strong>.</p>
<p>The pixel composition is computed using the following formula:</p>
<pre>
result = k1*i1*i2 + k2*i1 + k3*i2 + k4
</pre>
<h2 id="Usage_context">Usage context</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="row">Categories</th>
      <td><em>None</em></td>
    </tr>
    <tr>
      <th scope="row">Value</th>
      <td><a href="/en-US/docs/SVG/Content_type#Number" title="/en-US/docs/SVG/Content_type#Number">&lt;number&gt;</a></td>
    </tr>
    <tr>
      <th scope="row">Animatable</th>
      <td>Yes</td>
    </tr>
    <tr>
      <th scope="row">Normative document</th>
      <td><a class="external" href="http://www.w3.org/TR/SVG11/filters.html#feCompositeK2Attribute" title="http://www.w3.org/TR/SVG11/filters.html#feCompositeK2Attribute">SVG 1.1 (2nd Edition)</a></td>
    </tr>
  </tbody>
</table>
<h2 id="Example">Example</h2>
<h2 id="Elements">Elements</h2>
<p>The following elements can use the <code>k2</code> attribute</p>
<ul>
  <li>{{ SVGElement("feComposite") }}</li>
</ul>
Revert to this revision