<fePointLight>
Baseline
Widely available
Cette fonctionnalité est bien établie et fonctionne sur de nombreux appareils et versions de navigateurs. Elle est disponible sur tous les navigateurs depuis juillet 2015.
La primitive de filtre <fePointLight> définit une source de lumière qui permet de créer un point lumineux. On la place dans une primitive de filtre d'éclairage: <feDiffuseLighting> or <feSpecularLighting>.
Contexte d'utilisation
Attributs
Attributs globaux
Attributs spécifiques
Interface DOM
Cet élément implémente l'interface SVGFEPointLightElement.
Exemple
SVG
html
<svg
width="200"
height="200"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<filter id="spotlight">
<feSpecularLighting
result="spotlight"
specularConstant="1.5"
specularExponent="80"
lighting-color="#FFF">
<fePointLight x="50" y="50" z="220" />
</feSpecularLighting>
<feComposite
in="SourceGraphic"
in2="spotlight"
operator="arithmetic"
k1="0"
k2="1"
k3="1"
k4="0" />
</filter>
</defs>
<image
xlink:href="/files/6457/mdn_logo_only_color.png"
x="10%"
y="10%"
width="80%"
height="80%"
style="filter:url(#spotlight);" />
</svg>
Résultat
Spécifications
| Specification |
|---|
| Filter Effects Module Level 1 # fePointLightElement |
Compatibilité des navigateurs
Enable JavaScript to view this browser compatibility table.