--- title: slug: Web/SVG/Element/fePointLight tags: - Element - SVG - SVG Filter - SVG Light Source translation_of: Web/SVG/Element/fePointLight ---
{{SVGRef}}

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: {{SVGElement("feDiffuseLighting")}} or {{SVGElement("feSpecularLighting")}}.

Contexte d'utilisation

{{svginfo}}

Attributs

Attributs globaux

Attributs spécifiques

Interface DOM

Cet élément implémente l'interface {{domxref("SVGFEPointLightElement")}}.

Exemple

SVG

<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

{{EmbedLiveSample("Exemple", 200, 200)}}

Spécifications

Spécification Statut Commentaire
{{SpecName('Filters 1.0', '#fePointLightElement', '<fePointLight>')}} {{Spec2('Filters 1.0')}} Aucun changement
{{SpecName('SVG1.1', 'filters.html#fePointLightElement', '<fePointLight>')}} {{Spec2('SVG1.1')}} Définition initiale

Compatibilité des navigateurs

{{Compat("svg.elements.fePointLight")}}

Voir aussi