SVGFEDiffuseLightingElement: y-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 y-Eigenschaft der Schnittstelle SVGFEDiffuseLightingElement beschreibt die vertikale Koordinate der Position eines SVG-Filter-Primitivs als ein SVGAnimatedLength.

Sie spiegelt den Wert des Filter-Primitivattributs y des Elements <feDiffuseLighting> wider. Der Filter beleuchtet ein Bild, wobei der Alphakanal als Höhenkarte verwendet wird. Das Attribut ist entweder ein <length> oder ein <percentage>. Das <coordinate> ist eine Länge im Nutzerkoordinatensystem, die den gegebenen Abstand vom Ursprung des Filters entlang der y-Achse angibt. Wenn das y-Attribut einen Prozentwert hat, ist der Eigenschaftswert relativ zur Höhe der Filterregion in Einheiten des Nutzerkoordinatensystems. Der Standardwert ist 0.

Wert

Beispiel

js
const feDiffuseLighting = document.querySelector("feDiffuseLighting");
const topPosition = feDiffuseLighting.y;
console.log(topPosition.baseVal.value); // the `y` value

Spezifikationen

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

Browser-Kompatibilität

BCD tables only load in the browser

Siehe auch