Debian Codegraph @

samples/tests/spec/filters/feComponentTransfer2.svg

raw
1 <?xml version="1.0" 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
5 <!--
6
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21
22 -->
23 <!-- ========================================================================= -->
24 <!-- Test description here -->
25 <!-- -->
26 <!-- @author [email protected] -->
27 <!-- @version $Id$ -->
28 <!-- ========================================================================= -->
29
30 <?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?>
31
32 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body" width="450" height="500" viewBox="0 0 450 500">
33 <title>Filter Effect: feComponentTransfer (2)</title>
34 <!-- ============================================================= -->
35 <!-- Test content -->
36 <!-- ============================================================= -->
37 <g id="testContent">
38
39
40 <g>
41 <text x="225" y="40" class="title">
42 Filter Effect: feComponentTransfer (2)
43 </text>
44 <g transform="translate(30,62.5)">
45 <defs>
46 <filter id="turbSource" filterUnits="objectBoundingBox"
47 x="0%" y="0%" width="100%" height="100%">
48 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
49 </filter>
50
51 <filter id="tableIdentity" filterUnits="objectBoundingBox"
52 x="0%" y="0%" width="100%" height="100%">
53 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
54 <feComponentTransfer
55 x="0%" y="0%" width="100%" height="100%" >
56 <feFuncR type="table" tableValues="0 1" />
57 <feFuncG type="table" tableValues="0 1" />
58 <feFuncB type="table" tableValues="0 1" />
59 <feFuncA type="table" tableValues="0 1" />
60 </feComponentTransfer>
61 </filter>
62
63 <filter id="tableInvertRGB" filterUnits="objectBoundingBox"
64 x="0%" y="0%" width="100%" height="100%">
65 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
66 <feComponentTransfer
67 x="0%" y="0%" width="100%" height="100%" >
68 <feFuncR type="table" tableValues="1 0" />
69 <feFuncG type="table" tableValues="1 0" />
70 <feFuncB type="table" tableValues="1 0" />
71 <feFuncA type="linear" slope="0" intercept="1" />
72 </feComponentTransfer>
73 </filter>
74
75 <filter id="tableBlueGreenTint" filterUnits="objectBoundingBox"
76 x="0%" y="0%" width="100%" height="100%">
77 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
78 <feColorMatrix type="luminanceToAlpha" />
79 <feColorMatrix type="matrix" values="0 0 0 -1 1 0 0 0 -1 1 0 0 0 -1 1 0 0 0 0 1" />
80 <feComponentTransfer
81 x="0%" y="0%" width="100%" height="100%" >
82 <feFuncR type="table" tableValues="0 0 0 .2 1" />
83 <feFuncG type="table" tableValues="0 0 .3 .9 1" />
84 <feFuncB type="table" tableValues="0 .3 .6 .9 1" />
85 <feFuncA type="linear" slope="1" intercept="0" />
86 </feComponentTransfer>
87 </filter>
88
89 <filter id="tableRedOrangeTint" filterUnits="objectBoundingBox"
90 x="0%" y="0%" width="100%" height="100%">
91 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
92 <feColorMatrix type="luminanceToAlpha" />
93 <feColorMatrix type="matrix" values="0 0 0 -1 1 0 0 0 -1 1 0 0 0 -1 1 0 0 0 0 1" />
94 <feComponentTransfer
95 x="0%" y="0%" width="100%" height="100%" >
96 <feFuncR type="table" tableValues="0 .3 .6 .9 1" />
97 <feFuncG type="table" tableValues="0 0 .3 .9 1" />
98 <feFuncB type="table" tableValues="0 0 0 0 1" />
99 <feFuncA type="linear" slope="1" intercept="0" />
100 </feComponentTransfer>
101 </filter>
102
103 <filter id="tableGreenGreenTint" filterUnits="objectBoundingBox"
104 x="0%" y="0%" width="100%" height="100%">
105 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
106 <feColorMatrix type="luminanceToAlpha" />
107 <feColorMatrix type="matrix" values="0 0 0 -1 1 0 0 0 -1 1 0 0 0 -1 1 0 0 0 0 1" />
108 <feComponentTransfer
109 x="0%" y="0%" width="100%" height="100%" >
110 <feFuncR type="table" tableValues="0 0 0 .6 1" />
111 <feFuncG type="table" tableValues="0 .15 .5 .9 1" />
112 <feFuncB type="table" tableValues="0 0 0 .6 1" />
113 <feFuncA type="linear" slope="1" intercept="0" />
114 </feComponentTransfer>
115 </filter>
116
117 <filter id="discreteYellowRed" filterUnits="objectBoundingBox"
118 x="0%" y="0%" width="100%" height="100%">
119 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
120 <feColorMatrix type="luminanceToAlpha" />
121 <feColorMatrix type="matrix" values="0 0 0 -1 1 0 0 0 -1 1 0 0 0 -1 1 0 0 0 0 1" />
122 <feComponentTransfer
123 x="0%" y="0%" width="100%" height="100%" >
124 <feFuncR type="discrete" tableValues="1 1" />
125 <feFuncG type="discrete" tableValues="1 0" />
126 <feFuncB type="discrete" tableValues="0 0" />
127 </feComponentTransfer>
128 </filter>
129
130 <filter id="discreteYellowOrangeRed" filterUnits="objectBoundingBox"
131 x="0%" y="0%" width="100%" height="100%">
132 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
133 <feColorMatrix type="luminanceToAlpha" />
134 <feColorMatrix type="matrix" values="0 0 0 -1 1 0 0 0 -1 1 0 0 0 -1 1 0 0 0 0 1" />
135 <feComponentTransfer
136 x="0%" y="0%" width="100%" height="100%" >
137 <feFuncR type="discrete" tableValues="1 1 1 .5" />
138 <feFuncG type="discrete" tableValues="1 1 .5 0" />
139 <feFuncB type="discrete" tableValues="1 0 0 0" />
140 </feComponentTransfer>
141 </filter>
142
143 <filter id="gamma" filterUnits="objectBoundingBox"
144 x="0%" y="0%" width="100%" height="100%">
145 <feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2"/>
146 <feComponentTransfer
147 x="0%" y="0%" width="100%" height="100%" >
148 <feFuncR type="gamma" amplitude="1" exponent="2.4" offset="0"/>
149 <feFuncG type="gamma" amplitude="1" exponent="2.4" offset="0"/>
150 <feFuncB type="gamma" amplitude="1" exponent="2.4" offset="0"/>
151 <feFuncA type="linear" slope="1" intercept="0" />
152 </feComponentTransfer>
153 </filter>
154
155 </defs>
156 <g class="legend">
157 <g id="reference_Group">
158 <rect x="25" y="25" width="100" height="75" style="filter:url(#turbSource)" />
159 <text x="75" y="117">Reference Image</text>
160 </g>
161
162 <g id="tableIdentity_Group" transform="translate(120, 0)">
163 <rect x="25" y="25" width="100" height="75" style="filter:url(#tableIdentity)" />
164 <text x="75" y="117">type=table</text>
165 <text x="75" y="129">Identity tables (0 1)</text>
166 </g>
167
168 <g id="tableInvertRGB_Group" transform="translate(240, 0)">
169 <rect x="25" y="25" width="100" height="75" style="filter:url(#tableInvertRGB)" />
170 <text x="75" y="117">type=table</text>
171 <text x="75" y="129">Invert RGB (1 0)</text>
172 </g>
173
174 <g id="tableBlueGreenTint_Group" transform="translate(0, 120)">
175 <rect x="25" y="25" width="100" height="75" style="filter:url(#tableBlueGreenTint)" />
176 <text x="75" y="117">type=table</text>
177 <text x="75" y="129">darkBlue-cyan</text>
178 </g>
179
180 <g id="tableRedOrangeTint_Group" transform="translate(120, 120)">
181 <rect x="25" y="25" width="100" height="75" style="filter:url(#tableRedOrangeTint)" />
182 <text x="75" y="117">type=table</text>
183 <text x="75" y="129">darkRed-orange</text>
184 </g>
185
186 <g id="tableGreenGreenTint_Group" transform="translate(240, 120)">
187 <rect x="25" y="25" width="100" height="75" style="filter:url(#tableGreenGreenTint)" />
188 <text x="75" y="117">type=table</text>
189 <text x="75" y="129">darkGreen-green</text>
190 </g>
191
192 <g id="discreteYellowRed_Group" transform="translate(0, 240)">
193 <rect x="25" y="25" width="100" height="75" style="filter:url(#discreteYellowRed)" />
194 <text x="75" y="117">type=discrete</text>
195 <text x="75" y="129">yellow-red</text>
196 </g>
197
198 <g id="discreteYellowOrangeRed_Group" transform="translate(120, 240)">
199 <rect x="25" y="25" width="100" height="75" style="filter:url(#discreteYellowOrangeRed)" />
200 <text x="75" y="117">type=discrete</text>
201 <text x="75" y="129">White-Yellow-Orange-Red</text>
202 </g>
203
204 <g id="gamma_Group" transform="translate(240, 240)">
205 <rect x="25" y="25" width="100" height="75" style="filter:url(#gamma)" />
206 <text x="75" y="117">type=gamma</text>
207 <text x="75" y="129">exponent (2.4) </text>
208 <text x="75" y="141">offset (0) amplitude (1)</text>
209 </g>
210 </g>
211 </g>
212 </g>
213
214 </g>
215
216 <!-- ============================================================= -->
217 <!-- Batik sample mark -->
218 <!-- ============================================================= -->
219 <use xlink:href="../../../batikLogo.svg#Batik_Tag_Box" />
220
221 </svg>