« 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 attributeprimitiveUnits) between successive columns and rows, respectively, in thekernelMatrix.
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