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

kernelUnitLength

« SVG Attribute reference home

The kernelUnitLength attribute has two meaning based on the context it's used.

The first number is the <dx> value. The second number is the <dy> value. If the <dy> value is not specified, it defaults to the same value as <dx>.

  • For lighting filter primitives, it Indicates the intended distance in current filter units (i.e., units as determined by the value of attribute primitiveUnits) for dx and dy, respectively, in the surface normal calculation formulas.
  • For the <feconvolvematrix> primitive, it indicates the intended distance in current filter units (i.e., units as determined by the value of attribute primitiveUnits) between successive columns and rows, respectively, in the kernelMatrix.

By specifying value(s) for kernelUnitLength, the kernel becomes defined in a scalable, abstract coordinate system.

If kernelUnitLength is not specified, in many cases it is define as one pixel in the intermediate image offscreen bitmap, which is a pixel-based coordinate system, and thus potentially not scalable which can have serious visual impact on SVG content.

Usage context

Categories None
Value <number-optional-number>
Animatable Yes
Normative document SVG 1.1 (2nd Edition) : feConvolveMatrix
SVG 1.1 (2nd Edition) : feDiffuseLighting
SVG 1.1 (2nd Edition) : feSpecularLighting

Example

Elements

The following elements can use the kernelUnitLength attribute

Document Tags and Contributors

 Contributors to this page: Jeremie
 Last updated by: Jeremie,