summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/filters/feConvolveMatrix-1.svg
blob: 8bdc267d71d6376359645029a057e5e949b45555 (plain)
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
<svg xmlns="http://www.w3.org/2000/svg">

<filter id="f1" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" 
         x="0" y="0" width="1" height="1">
  <feConvolveMatrix x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
   order="3" kernelMatrix="0 1 0   1 -4 1   0 1 0" in="SourceGraphic"/>
</filter>
<g filter="url(#f1)">
  <rect x="0" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
  <rect x="49" y="0" width="2" height="100" fill="#00ff00"/>
</g>

<!-- can't figure out a good way to test kernelUnitLength
<filter id="f2" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" 
         x="0" y="0" width="1" height="1">
  <feConvolveMatrix x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
   order="3" kernelUnitLength="0.1" kernelMatrix="0 1 0   1 -4 1   0 1 0" in="SourceGraphic"/>
</filter>
<g filter="url(#f2)">
  <rect x="100" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
  <rect x="140" y="0" width="20" height="100" fill="#00ff00"/>
</g>
-->

<filter id="f3" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" 
         x="0" y="0" width="1" height="1">
  <feConvolveMatrix x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
   order="3" kernelMatrix="0 1 0   1 -4 1   0 1 0" bias="-1" preserveAlpha="true" in="SourceGraphic"/>
</filter>
<g filter="url(#f3)">
  <rect x="200" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
  <rect x="249" y="0" width="2" height="100" fill="#00ff00"/>
</g>

<filter id="f4" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" 
         x="0" y="0" width="1" height="1">
  <feConvolveMatrix x="10%" y="10%" width="80%" height="80%" style="color-interpolation-filters:sRGB"
   order="3" kernelMatrix="0 1 0   1 -4 1   0 1 0" divisor="100000" preserveAlpha="true" in="SourceGraphic"/>
</filter>
<g filter="url(#f4)">
  <rect x="300" y="0" width="100" height="100" fill="#00ff00" opacity="0"/>
  <rect x="349" y="0" width="2" height="100" fill="#00ff00"/>
</g>

<filter id="f5" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" 
         x="0" y="0" width="1" height="1">
  <feConvolveMatrix style="color-interpolation-filters:sRGB"
   order="3" kernelMatrix="0 1 0   1 -4 1   0 1 0" edgeMode="wrap" in="SourceGraphic"/>
</filter>
<g filter="url(#f5)">
  <rect x="0" y="100" width="100" height="100" fill="#00ff00" opacity="0"/>
  <rect x="0" y="100" width="1" height="100" fill="#00ff00"/>
</g>

<filter id="f6" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" 
         x="0" y="0" width="1" height="1">
  <feConvolveMatrix style="color-interpolation-filters:sRGB"
   order="3" kernelMatrix="0 1 0   1 -4 1   0 1 0" edgeMode="duplicate" in="SourceGraphic"/>
</filter>
<g filter="url(#f6)">
  <rect x="100" y="100" width="100" height="100" fill="#00ff00" opacity="0"/>
  <rect x="100" y="100" width="1" height="100" fill="#ff0000"/>
</g>

<filter id="f7" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" 
         x="0" y="0" width="1" height="1">
  <feConvolveMatrix style="color-interpolation-filters:sRGB"
   order="3" kernelMatrix="0 1 0   1 -4 1   0 1 0" edgeMode="none" in="SourceGraphic"/>
</filter>
<g filter="url(#f7)">
  <rect x="200" y="100" width="100" height="100" fill="#00ff00" opacity="0"/>
  <rect x="200" y="100" width="1" height="100" fill="#0000ff"/>
</g>

</svg>