SVG – Learning by Coding
1: <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2: <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
3: "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
4: <!ATTLIST svg xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink">
5: ]>
6:
7: <!-- SVG - Learning by Coding - http://www.datenverdrahten.de/svglbc/ -->
8: <!-- Author: Dr. Thomas Meinike 12/03 - thomas@handmadecode.de -->
9:
10: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
11:
12: <defs>
13:
14: <filter id="cm-unf" filterUnits="objectBoundingBox" x="0" y="0" width="370" height="220">
15: <feColorMatrix type="saturate" values="1"/><!-- unfiltered -->
16: </filter>
17:
18: <filter id="cm-mat" filterUnits="objectBoundingBox" x="0" y="0" width="370" height="220">
19: <feColorMatrix type="matrix" values="0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0"/>
20: </filter>
21:
22: <filter id="cm-hue" filterUnits="objectBoundingBox" x="0" y="0" width="370" height="220">
23: <feColorMatrix type="hueRotate" values="90"/><!-- Winkel, 0=kein Effekt -->
24: </filter>
25:
26: <filter id="cm-sat" filterUnits="objectBoundingBox" x="0" y="0" width="370" height="220">
27: <feColorMatrix type="saturate" values="0.5"/><!-- 0=s/w ... 1=kein Effekt -->
28: </filter>
29:
30: <filter id="cm-lum" filterUnits="objectBoundingBox" x="0" y="0" width="370" height="220">
31: <feColorMatrix type="luminanceToAlpha"/><!-- Negativ-Bild -->
32: </filter>
33:
34: </defs>
35:
36: <title>SVG - Learning by Coding</title>
37: <desc>SVG-Spezifikation in Beispielen</desc>
38: <text x="20" y="30" style="fill: #000; font-size: 24px">
39: Filter-Element feColorMatrix</text>
40:
41: <g transform="scale(0.6)">
42: <image xlink:href="bilder/bild1.jpg" x="20" y="70" width="375" height="220" style="filter: url(#cm-unf)"/>
43: <image xlink:href="bilder/bild1.jpg" x="395" y="70" width="375" height="220" style="filter: url(#cm-mat)"/>
44: <image xlink:href="bilder/bild1.jpg" x="20" y="290" width="375" height="220" style="filter: url(#cm-hue)"/>
45: <image xlink:href="bilder/bild1.jpg" x="395" y="290" width="375" height="220" style="filter: url(#cm-sat)"/>
46: <image xlink:href="bilder/bild1.jpg" x="20" y="510" width="375" height="220" style="filter: url(#cm-lum)"/>
47:
48: </g>
49:
50: <text x="270" y="340"><tspan style="fill: #000"><feColorMatrix ... </tspan>
51: <tspan style="fill: #F00">type="..."</tspan><tspan style="fill: #000"> /></tspan>
52: </text>
53: <rect x="280" y="360" width="70" height="20" style="fill: #EEE"/>
54: <text x="285" y="375" style="fill: #F00">unfiltered</text>
55: <rect x="350" y="360" width="70" height="20" style="fill: #EEE"/>
56: <text x="355" y="375" style="fill: #F00">matrix</text>
57: <rect x="280" y="380" width="70" height="20" style="fill: #EEE"/>
58: <text x="285" y="395" style="fill: #F00">hueRotate</text>
59: <rect x="350" y="380" width="70" height="20" style="fill: #EEE"/>
60: <text x="355" y="395" style="fill: #F00">saturate</text>
61: <rect x="280" y="400" width="140" height="20" style="fill: #EEE"/>
62: <text x="285" y="415" style="fill: #F00">luminanceToAlpha</text>
63:
64: </svg>
[zum Anfang]