| 1 |
<svg version="1.1" baseProfile="basic" id="svg-root" |
| 2 |
width="100%" height="100%" viewBox="0 0 480 360" |
| 3 |
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 4 |
<!--======================================================================--> |
| 5 |
<!--= SVG 1.1 2nd Edition Test Case =--> |
| 6 |
<!--======================================================================--> |
| 7 |
<!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =--> |
| 8 |
<!--= Institute of Technology, European Research Consortium for =--> |
| 9 |
<!--= Informatics and Mathematics (ERCIM), Keio University). =--> |
| 10 |
<!--= All Rights Reserved. =--> |
| 11 |
<!--= See http://www.w3.org/Consortium/Legal/. =--> |
| 12 |
<!--======================================================================--> |
| 13 |
<d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" |
| 14 |
template-version="1.4" reviewer="SVGWG" author="Jon Ferraiolo" status="accepted" |
| 15 |
version="$Revision: 1.6 $" testname="$RCSfile: filters-composite-02-b.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feCompositeElement"> |
| 17 |
<p> |
| 18 |
Test which verifies the basic facilities of feComposite. |
| 19 |
</p> |
| 20 |
<p> |
| 21 |
This test uses the following elements: <path>, <filter> |
| 22 |
<feImage> <feComposite>. |
| 23 |
</p> |
| 24 |
<p> |
| 25 |
The test case shows six pairs of overlapping triangles |
| 26 |
depicting the six different feComposite operators. The |
| 27 |
first row shows compositing when both triangles have |
| 28 |
opacity=1. The second row shows compositing when both |
| 29 |
triangles have opacity=.5. The six columns illustrate the |
| 30 |
six types of compositing operations. |
| 31 |
</p> |
| 32 |
</d:testDescription> |
| 33 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 34 |
<p> |
| 35 |
Run the test. No interaction required. |
| 36 |
</p> |
| 37 |
</d:operatorScript> |
| 38 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 39 |
<p> |
| 40 |
The rendered picture should match the reference image |
| 41 |
exactly, except for possible variations in the |
| 42 |
labelling text (per CSS2 rules). |
| 43 |
</p> |
| 44 |
</d:passCriteria> |
| 45 |
</d:SVGTestCase> |
| 46 |
<title id="test-title">$RCSfile: filters-composite-02-b.svg,v $</title> |
| 47 |
<defs> |
| 48 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 49 |
<font-face-src> |
| 50 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 51 |
</font-face-src> |
| 52 |
</font-face> |
| 53 |
</defs> |
| 54 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 55 |
<g transform="translate(15 -60)"> |
| 56 |
<title>Example feComposite - Examples of feComposite operations</title> |
| 57 |
<desc>Six pairs of overlapping triangles depicting the six different feComposite operators.</desc> |
| 58 |
<defs> |
| 59 |
<path id="Blue100" d="M 0 0 L 150 0 L 150 150 z" fill="#00ffff"/> |
| 60 |
<path id="Red100" d="M 0 0 L 0 150 L 150 0 z" fill="#ff00ff"/> |
| 61 |
<path id="Blue50" d="M 0 0 L 150 0 L 150 150 z" fill="#00ffff" fill-opacity="0.5"/> |
| 62 |
<path id="Red50" d="M 0 0 L 0 150 L 150 0 z" fill="#ff00ff" fill-opacity="0.5"/> |
| 63 |
|
| 64 |
<filter id="over" x="0" y="0" width="1" height="1"> |
| 65 |
<feImage xlink:href="#Blue100" result="blue"/> |
| 66 |
<feImage xlink:href="#Red100" result="red"/> |
| 67 |
<feComposite in2="blue" in="red" operator="over"/> |
| 68 |
</filter> |
| 69 |
|
| 70 |
<filter id="over50" x="0" y="0" width="1" height="1"> |
| 71 |
<feImage xlink:href="#Blue50" result="blue"/> |
| 72 |
<feImage xlink:href="#Red50" result="red"/> |
| 73 |
<feComposite in2="blue" in="red" operator="over"/> |
| 74 |
</filter> |
| 75 |
|
| 76 |
<filter id="in" x="0" y="0" width="1" height="1"> |
| 77 |
<feImage xlink:href="#Blue100" result="blue"/> |
| 78 |
<feImage xlink:href="#Red100" result="red"/> |
| 79 |
<feComposite in2="blue" in="red" operator="in"/> |
| 80 |
</filter> |
| 81 |
|
| 82 |
<filter id="in50" x="0" y="0" width="1" height="1"> |
| 83 |
<feImage xlink:href="#Blue50" result="blue"/> |
| 84 |
<feImage xlink:href="#Red50" result="red"/> |
| 85 |
<feComposite in2="blue" in="red" operator="in"/> |
| 86 |
</filter> |
| 87 |
|
| 88 |
<filter id="out" x="0" y="0" width="1" height="1"> |
| 89 |
<feImage xlink:href="#Blue100" result="blue"/> |
| 90 |
<feImage xlink:href="#Red100" result="red"/> |
| 91 |
<feComposite in2="blue" in="red" operator="out"/> |
| 92 |
</filter> |
| 93 |
|
| 94 |
<filter id="out50" x="0" y="0" width="1" height="1"> |
| 95 |
<feImage xlink:href="#Blue50" result="blue"/> |
| 96 |
<feImage xlink:href="#Red50" result="red"/> |
| 97 |
<feComposite in2="blue" in="red" operator="out"/> |
| 98 |
</filter> |
| 99 |
|
| 100 |
<filter id="atop" x="0" y="0" width="1" height="1"> |
| 101 |
<feImage xlink:href="#Blue100" result="blue"/> |
| 102 |
<feImage xlink:href="#Red100" result="red"/> |
| 103 |
<feComposite in2="blue" in="red" operator="atop"/> |
| 104 |
</filter> |
| 105 |
|
| 106 |
<filter id="atop50" x="0" y="0" width="1" height="1"> |
| 107 |
<feImage xlink:href="#Blue50" result="blue"/> |
| 108 |
<feImage xlink:href="#Red50" result="red"/> |
| 109 |
<feComposite in2="blue" in="red" operator="atop"/> |
| 110 |
</filter> |
| 111 |
|
| 112 |
<filter id="xor" x="0" y="0" width="1" height="1"> |
| 113 |
<feImage xlink:href="#Blue100" result="blue"/> |
| 114 |
<feImage xlink:href="#Red100" result="red"/> |
| 115 |
<feComposite in2="blue" in="red" operator="xor"/> |
| 116 |
</filter> |
| 117 |
|
| 118 |
<filter id="xor50" x="0" y="0" width="1" height="1"> |
| 119 |
<feImage xlink:href="#Blue50" result="blue"/> |
| 120 |
<feImage xlink:href="#Red50" result="red"/> |
| 121 |
<feComposite in2="blue" in="red" operator="xor"/> |
| 122 |
</filter> |
| 123 |
|
| 124 |
<filter id="arithmetic" x="0" y="0" width="1" height="1"> |
| 125 |
<feImage xlink:href="#Blue100" result="blue"/> |
| 126 |
<feImage xlink:href="#Red100" result="red"/> |
| 127 |
<feComposite in2="blue" in="red" operator="arithmetic" k1=".5" k2=".5" k3=".5" k4=".5"/> |
| 128 |
</filter> |
| 129 |
|
| 130 |
<filter id="arithmetic50" x="0" y="0" width="1" height="1"> |
| 131 |
<feImage xlink:href="#Blue50" result="blue"/> |
| 132 |
<feImage xlink:href="#Red50" result="red"/> |
| 133 |
<feComposite in2="blue" in="red" operator="arithmetic" k1=".5" k2=".5" k3=".5" k4=".5"/> |
| 134 |
</filter> |
| 135 |
</defs> |
| 136 |
<g font-family="Verdana" font-size="60" shape-rendering="crispEdges" transform="translate(5,70) scale(.4)"> |
| 137 |
<rect fill="none" stroke="blue" x="1" y="1" width="1098" height="723"/> |
| 138 |
<text x="100" y="75">on first Row : opacity 1.0</text> |
| 139 |
<text x="100" y="180">on second row opacity 0.5</text> |
| 140 |
|
| 141 |
<g transform="translate(15,230)"> |
| 142 |
<rect x="0" y="0" width="150" height="150" filter="url(#over)"/> |
| 143 |
<text x="10" y="400">over</text> |
| 144 |
</g> |
| 145 |
|
| 146 |
<g transform="translate(15,430)"> |
| 147 |
<rect x="0" y="0" width="150" height="150" filter="url(#over50)"/> |
| 148 |
</g> |
| 149 |
|
| 150 |
<g transform="translate(195,230)"> |
| 151 |
<rect x="0" y="0" width="150" height="150" filter="url(#in)"/> |
| 152 |
<text x="10" y="400">in</text> |
| 153 |
</g> |
| 154 |
|
| 155 |
<g transform="translate(195,430)"> |
| 156 |
<rect x="0" y="0" width="150" height="150" filter="url(#in50)"/> |
| 157 |
</g> |
| 158 |
|
| 159 |
<g transform="translate(375,230)"> |
| 160 |
<rect x="0" y="0" width="150" height="150" filter="url(#out)"/> |
| 161 |
<text x="10" y="400">out</text> |
| 162 |
</g> |
| 163 |
<g transform="translate(375,430)"> |
| 164 |
<rect x="0" y="0" width="150" height="150" filter="url(#out50)"/> |
| 165 |
</g> |
| 166 |
|
| 167 |
<g transform="translate(555,230)"> |
| 168 |
<rect x="0" y="0" width="150" height="150" filter="url(#atop)"/> |
| 169 |
<text x="10" y="400">atop</text> |
| 170 |
</g> |
| 171 |
<g transform="translate(555,430)"> |
| 172 |
<rect x="0" y="0" width="150" height="150" filter="url(#atop50)"/> |
| 173 |
</g> |
| 174 |
|
| 175 |
<g transform="translate(735,230)"> |
| 176 |
<rect x="0" y="0" width="150" height="150" filter="url(#xor)"/> |
| 177 |
<text x="10" y="400">xor</text> |
| 178 |
</g> |
| 179 |
<g transform="translate(735,430)"> |
| 180 |
<rect x="0" y="0" width="150" height="150" filter="url(#xor50)"/> |
| 181 |
</g> |
| 182 |
<g transform="translate(915,230)"> |
| 183 |
<rect x="0" y="0" width="150" height="150" filter="url(#arithmetic)"/> |
| 184 |
<text x="-25" y="400">arith-</text> |
| 185 |
<text x="-25" y="470">metic</text> |
| 186 |
</g> |
| 187 |
<g transform="translate(915,430)"> |
| 188 |
<rect x="0" y="0" width="150" height="150" filter="url(#arithmetic50)"/> |
| 189 |
</g> |
| 190 |
</g> |
| 191 |
</g> |
| 192 |
</g> |
| 193 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 194 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 195 |
</g> |
| 196 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 197 |
<!-- comment out this watermark once the test is approved --> |
| 198 |
<!--<g id="draft-watermark"> |
| 199 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 200 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 201 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 202 |
</g>--> |
| 203 |
</svg> |