blob: a7c8633a4ff3ed0c80b4e017a8f88eaa19bdf8ba (
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
|
<svg id="svg-root" width="100%" height="100%"
viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- normal offset -->
<filter id="offset1" primitiveUnits="objectBoundingBox">
<feOffset dx="0.5" dy="0.1"/>
</filter>
<!-- zero offset -->
<filter id="offset2" primitiveUnits="objectBoundingBox">
<feOffset dx="0" dy="0"/>
</filter>
<!-- offset larger than the source (no intersection) -->
<filter id="offset3" primitiveUnits="objectBoundingBox">
<feOffset dx="100" dy="100"/>
</filter>
<g transform="translate(30 20)">
<rect fill="green" x="1" y="1" width="50" height="50"/>
<rect fill="red" x="60" y="1" width="50" height="50"/>
<rect fill="green" x="1" y="60" width="50" height="50"/>
<rect fill="red" x="1" y="60" width="50" height="50" filter="url(#offset1)"/>
<rect fill="green" x="1" y="120" width="50" height="50"/>
<rect fill="red" x="1" y="120" width="50" height="50" filter="url(#offset2)"/>
<rect fill="green" x="1" y="180" width="50" height="50"/>
<rect fill="red" x="1" y="180" width="50" height="50" filter="url(#offset3)"/>
</g>
</svg>
|