SVGFEConvolveMatrixElement: width-Eigenschaft

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Die width-Schreibgeschützte Eigenschaft der SVGFEConvolveMatrixElement-Schnittstelle beschreibt die horizontale Größe eines SVG-Filterprimitivs als ein SVGAnimatedLength.

Sie spiegelt das <feConvolveMatrix>-Element und das Filterprimitivattribut width wider. Der <feConvolveMatrix>-Filter wendet einen Matrixfaltungseffekt an, bei dem Pixel im Eingabebild mit benachbarten Pixeln kombiniert werden, um einen Faltungseffekt wie Unschärfe, Kantenerkennung, Schärfung, Prägung oder Abschrägung zu erzeugen. Das Attribut ist ein \<length> oder ein <percentage> relativ zur Breite des Filterbereichs. Der Standardwert ist 100%. Der Eigenschaftswert ist eine Länge in Einheiten des Benutzerkoordinatensystems.

Wert

Beispiel

js
const feConvolveMatrix = document.querySelector("feConvolveMatrix");
const horizontalSize = feConvolveMatrix.width;
console.log(horizontalSize.baseVal.value); // the `width` value

Spezifikationen

Specification
Filter Effects Module Level 1
# dom-svgfilterprimitivestandardattributes-width

Browser-Kompatibilität

BCD tables only load in the browser

Siehe auch