-
Notifications
You must be signed in to change notification settings - Fork 8.1k
/
index.md
91 lines (68 loc) · 1.82 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
title: <fePointLight>
slug: 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 de base](/fr/docs/Web/SVG/Attribute#Attributs_de_base)
### Attributs spécifiques
- {{SVGAttr("x")}}
- {{SVGAttr("y")}}
- {{SVGAttr("z")}}
## Interface DOM
Cet élément implémente l'interface {{domxref("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
{{EmbedLiveSample("Exemple", 200, 200)}}
## Spécifications
{{Specifications}}
## Compatibilité des navigateurs
{{Compat}}
## Voir aussi
- {{SVGElement("filter")}}
- {{SVGElement("animate")}}
- {{SVGElement("set")}}
- {{SVGElement("feDiffuseLighting")}}
- {{SVGElement("feSpecularLighting")}}
- {{SVGElement("feDistantLight")}}
- {{SVGElement("feSpotLight")}}
- [Tutoriel SVG: Filtres](/fr/docs/Web/SVG/Tutoriel/filtres)