W3cubDocs

/SVG

kernelUnitLength

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

Example

Elements

The following elements can use the kernelUnitLength attribute

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/kernelUnitLength