| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> |
| 3 |
|
| 4 |
<!--======================================================================--> |
| 5 |
<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =--> |
| 6 |
<!--= Institute of Technology, Institut National de Recherche en =--> |
| 7 |
<!--= Informatique et en Automatique, Keio University). All Rights =--> |
| 8 |
<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =--> |
| 9 |
<!--======================================================================--> |
| 10 |
<!--======================================================================--> |
| 11 |
<!-- --> |
| 12 |
<!-- filters-transfer-BE-04.svg --> |
| 13 |
<!-- renamed for 1.1 suite to filters-comptran-01-f.svg --> |
| 14 |
<!-- --> |
| 15 |
<!-- Test which verifies the basic facilities of feComponentTransfer. --> |
| 16 |
<!-- --> |
| 17 |
<!-- Author : Jon Ferraiolo 03-Apr-2000 --> |
| 18 |
<!-- Revised for 1.1 : Mike Bultrowicz, 4 February 2002 --> |
| 19 |
<!-- --> |
| 20 |
<!-- History: --> |
| 21 |
<!-- 04-Apr-2000, JF: Serial#1 created. --> |
| 22 |
<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . --> |
| 23 |
<!-- 16-Aug-2000, LH="rename" ser#2. --> |
| 24 |
<!-- --> |
| 25 |
<!--======================================================================--> |
| 26 |
<!--======================================================================--> |
| 27 |
<!--= Note. After October 2000, revision history is kept as CVS 'commit' =--> |
| 28 |
<!--= log messages, and therefore is no longer in the preceding preamble.=--> |
| 29 |
<!--======================================================================--> |
| 30 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="480" height="360"> |
| 31 |
<SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"> |
| 32 |
<OperatorScript> |
| 33 |
<Paragraph> |
| 34 |
Test which verifies the basic facilities of |
| 35 |
feComponentTransfer. |
| 36 |
</Paragraph> |
| 37 |
<Paragraph> |
| 38 |
This test uses the following elements : a nested <svg> |
| 39 |
with a viewBox attribute, <linearGradient>, <filter>, |
| 40 |
<feComponentTransfer> |
| 41 |
</Paragraph> |
| 42 |
<Paragraph> |
| 43 |
The test case shows four rectangles filled with a |
| 44 |
gradient showing the effects of feComponentTransfer: an |
| 45 |
identity function acting as a reference, use of the |
| 46 |
feComponentTransfer table option, use of the |
| 47 |
feComponentTransfer linear option, and use of the |
| 48 |
feComponentTransfer gamma option. |
| 49 |
</Paragraph> |
| 50 |
<Paragraph> |
| 51 |
The test is somewhat self-explanatory as the strings |
| 52 |
document the type of feComponentTransfer operation that |
| 53 |
is being used. |
| 54 |
</Paragraph> |
| 55 |
</OperatorScript> |
| 56 |
</SVGTestCase> |
| 57 |
<title id="test-title">filters-comptran-01-f</title> |
| 58 |
<desc id="test-desc">Test which verifies the basic facilities of feComponentTransfer.</desc> |
| 59 |
<!--======================================================================--> |
| 60 |
<!--Content of Test Case follows... =====================--> |
| 61 |
<!--======================================================================--> |
| 62 |
<g id="test-body-content"> |
| 63 |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="35" y="50" width="400" height="200" viewBox="0 0 800 400"> |
| 64 |
<title>Example feComponentTransfer - Examples of feComponentTransfer operations</title> |
| 65 |
<desc>Four rectangles filled with a gradient showing the effects of feComponentTransfer: an identity function acting as a reference, use of the feComponentTransfer table option, use of the feComponentTransfer linear option, and use of the feComponentTransfer gamma option.</desc> |
| 66 |
<defs> |
| 67 |
<linearGradient id="MyGradient" gradientUnits="userSpaceOnUse" x1="100" y1="0" x2="600" y2="0"> |
| 68 |
<stop offset="0" stop-color="#ff0000" /> |
| 69 |
<stop offset=".33" stop-color="#00ff00" /> |
| 70 |
<stop offset=".67" stop-color="#0000ff" /> |
| 71 |
<stop offset="1" stop-color="#000000" /> |
| 72 |
</linearGradient> |
| 73 |
<filter id="Identity" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 74 |
<feComponentTransfer> |
| 75 |
<feFuncR type="identity"/> |
| 76 |
<feFuncG type="identity"/> |
| 77 |
<feFuncB type="identity"/> |
| 78 |
<feFuncA type="identity"/> |
| 79 |
</feComponentTransfer> |
| 80 |
</filter> |
| 81 |
<filter id="Table" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 82 |
<feComponentTransfer> |
| 83 |
<feFuncR type="table" tableValues="0 0 1 1"/> |
| 84 |
<feFuncG type="table" tableValues="1 1 0 0"/> |
| 85 |
<feFuncB type="table" tableValues="0 1 1 0"/> |
| 86 |
</feComponentTransfer> |
| 87 |
</filter> |
| 88 |
<filter id="Linear" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 89 |
<feComponentTransfer> |
| 90 |
<feFuncR type="linear" slope=".5" intercept=".25"/> |
| 91 |
<feFuncG type="linear" slope=".5" intercept="0"/> |
| 92 |
<feFuncB type="linear" slope=".5" intercept=".5"/> |
| 93 |
</feComponentTransfer> |
| 94 |
</filter> |
| 95 |
<filter id="Gamma" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 96 |
<feComponentTransfer> |
| 97 |
<feFuncR type="gamma" amplitude="2" exponent="5" offset="0"/> |
| 98 |
<feFuncG type="gamma" amplitude="2" exponent="3" offset="0"/> |
| 99 |
<feFuncB type="gamma" amplitude="2" exponent="1" offset="0"/> |
| 100 |
</feComponentTransfer> |
| 101 |
</filter> |
| 102 |
</defs> |
| 103 |
<rect fill="none" stroke="blue" x="1" y="1" width="798" height="398"/> |
| 104 |
<g font-size="25" font-family="Verdana" > |
| 105 |
<rect fill="none" stroke="blue" x="1" y="1" width="798" height="398"/> |
| 106 |
<rect x="100" y="20" width="500" height="40" fill="url(#MyGradient)" filter="url(#Identity)" /> |
| 107 |
<text x="100" y="85">type="identity"</text> |
| 108 |
<rect x="100" y="120" width="500" height="40" fill="url(#MyGradient)" filter="url(#Table)" /> |
| 109 |
<text x="100" y="185">type="table"</text> |
| 110 |
<rect x="100" y="220" width="500" height="40" fill="url(#MyGradient)" filter="url(#Linear)" /> |
| 111 |
<text x="100" y="285">type="linear" slope=".5" intercepts:.25/0/.5</text> |
| 112 |
<rect x="100" y="320" width="500" height="40" fill="url(#MyGradient)" filter="url(#Gamma)" /> |
| 113 |
<text x="100" y="385">type="gamma" amplitude="2" exponents:5/3/1</text> |
| 114 |
</g> |
| 115 |
</svg> |
| 116 |
</g> |
| 117 |
<!--======================================================================--> |
| 118 |
<!--Legend and frame: Title, suite and SVG document serialization====--> |
| 119 |
<!--======================================================================--> |
| 120 |
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10"> |
| 121 |
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000"/> |
| 122 |
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/> |
| 123 |
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text> |
| 124 |
<a xlink:href="copyright-documents-19990405.html"> |
| 125 |
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text> |
| 126 |
</a> |
| 127 |
<text font-size="12" x="35" y="330">filters-comptran-01</text> |
| 128 |
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text> |
| 129 |
<text font-size="10" x="210" y="345">Release 1.0</text> |
| 130 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 131 |
</g> |
| 132 |
</svg> |