| 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-composite-BE-05.svg --> |
| 13 |
<!-- renamed for 1.1 suite to filters-composite-01-f.svg --> |
| 14 |
<!-- --> |
| 15 |
<!-- Test which verifies the basic facilities of feComposite. --> |
| 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 feComposite. |
| 35 |
</Paragraph> |
| 36 |
<Paragraph> |
| 37 |
This test uses the following elements: <path>, <use>, |
| 38 |
<linearGradient>, <filter> with, an enable-background |
| 39 |
attribute, <feFlood>, <feComposite>, <feMerge> |
| 40 |
</Paragraph> |
| 41 |
<Paragraph> |
| 42 |
The test case shows six pairs of overlapping triangles |
| 43 |
depicting the six different feComposite operators. The |
| 44 |
first row shows compositing when both triangles have |
| 45 |
opacity=1. The second row shows compositing when both |
| 46 |
triangles have opacity=.5. The six columns illustrate the |
| 47 |
six types of compositing operations. |
| 48 |
</Paragraph> |
| 49 |
</OperatorScript> |
| 50 |
</SVGTestCase> |
| 51 |
<title id="test-title">filters-composite-01-f</title> |
| 52 |
<desc id="test-desc">Test which verifies the basic facilities of feComposite.</desc> |
| 53 |
<!--======================================================================--> |
| 54 |
<!--Content of Test Case follows... =====================--> |
| 55 |
<!--======================================================================--> |
| 56 |
<g id="test-body-content" transform="translate(15 -60)"> |
| 57 |
<title>Example feComposite - Examples of feComposite operations</title> |
| 58 |
<desc>Six pairs of overlapping triangles depicting the six different feComposite operators.</desc> |
| 59 |
<defs> |
| 60 |
<path id="Blue100" d="M 0 0 L 100 0 L 100 100 z" fill="#00ffff" /> |
| 61 |
<path id="Red100" d="M 0 0 L 0 100 L 100 0 z" fill="#ff00ff" /> |
| 62 |
<path id="Blue50" d="M 0 125 L 100 125 L 100 225 z" fill="#00ffff" fill-opacity=".5" /> |
| 63 |
<path id="Red50" d="M 0 125 L 0 225 L 100 125 z" fill="#ff00ff" fill-opacity=".5" /> |
| 64 |
<filter id="over" filterUnits="objectBoundingBox" x="-5%" y="-5%" width="110%" height="110%"> |
| 65 |
<feFlood flood-color="#ffffff" flood-opacity="1" result="flood"/> |
| 66 |
<feComposite in="SourceGraphic" in2="BackgroundImage" operator="over" result="comp"/> |
| 67 |
<feMerge> |
| 68 |
<feMergeNode in="flood"/> |
| 69 |
<feMergeNode in="comp"/> |
| 70 |
</feMerge> |
| 71 |
</filter> |
| 72 |
<filter id="in" filterUnits="objectBoundingBox" x="-5%" y="-5%" width="110%" height="110%"> |
| 73 |
<feFlood flood-color="#ffffff" flood-opacity="1" result="flood"/> |
| 74 |
<feComposite in="SourceGraphic" in2="BackgroundImage" operator="in" result="comp"/> |
| 75 |
<feMerge> |
| 76 |
<feMergeNode in="flood"/> |
| 77 |
<feMergeNode in="comp"/> |
| 78 |
</feMerge> |
| 79 |
</filter> |
| 80 |
<filter id="out" filterUnits="objectBoundingBox" x="-5%" y="-5%" width="110%" height="110%"> |
| 81 |
<feFlood flood-color="#ffffff" flood-opacity="1" result="flood"/> |
| 82 |
<feComposite in="SourceGraphic" in2="BackgroundImage" operator="out" result="comp"/> |
| 83 |
<feMerge> |
| 84 |
<feMergeNode in="flood"/> |
| 85 |
<feMergeNode in="comp"/> |
| 86 |
</feMerge> |
| 87 |
</filter> |
| 88 |
<filter id="atop" filterUnits="objectBoundingBox" x="-5%" y="-5%" width="110%" height="110%"> |
| 89 |
<feFlood flood-color="#ffffff" flood-opacity="1" result="flood"/> |
| 90 |
<feComposite in="SourceGraphic" in2="BackgroundImage" operator="atop" result="comp"/> |
| 91 |
<feMerge> |
| 92 |
<feMergeNode in="flood"/> |
| 93 |
<feMergeNode in="comp"/> |
| 94 |
</feMerge> |
| 95 |
</filter> |
| 96 |
<filter id="xor" filterUnits="objectBoundingBox" x="-5%" y="-5%" width="110%" height="110%"> |
| 97 |
<feFlood flood-color="#ffffff" flood-opacity="1" result="flood"/> |
| 98 |
<feComposite in="SourceGraphic" in2="BackgroundImage" operator="xor" result="comp"/> |
| 99 |
<feMerge> |
| 100 |
<feMergeNode in="flood"/> |
| 101 |
<feMergeNode in="comp"/> |
| 102 |
</feMerge> |
| 103 |
</filter> |
| 104 |
<filter id="arithmetic" filterUnits="objectBoundingBox" x="-5%" y="-5%" width="110%" height="110%"> |
| 105 |
<feFlood flood-color="#ffffff" flood-opacity="1" result="flood"/> |
| 106 |
<feComposite in="SourceGraphic" in2="BackgroundImage" result="comp" operator="arithmetic" k1=".5" k2=".5" k3=".5" k4=".5"/> |
| 107 |
<feMerge> |
| 108 |
<feMergeNode in="flood"/> |
| 109 |
<feMergeNode in="comp"/> |
| 110 |
</feMerge> |
| 111 |
</filter> |
| 112 |
</defs> |
| 113 |
<g font-family="Verdana" font-size="40" shape-rendering="crispEdges" transform="translate(5,150) scale(.4)"> |
| 114 |
<rect fill="none" stroke="blue" x="1" y="1" width="1098" height="323"/> |
| 115 |
<text x="15" y="75">opacity 1.0</text> |
| 116 |
<text x="15" y="200">opacity 0.5</text> |
| 117 |
<g transform="translate(275,25)" enable-background="new" > |
| 118 |
<use xlink:href="#Blue100"/> |
| 119 |
<use xlink:href="#Red100" filter="url(#over)" /> |
| 120 |
</g> |
| 121 |
<g transform="translate(275,25)" enable-background="new" > |
| 122 |
<use xlink:href="#Blue50"/> |
| 123 |
<use xlink:href="#Red50" filter="url(#over)" /> |
| 124 |
<text x="5" y="275">over</text> |
| 125 |
</g> |
| 126 |
<g transform="translate(400,25)" enable-background="new" > |
| 127 |
<use xlink:href="#Blue100"/> |
| 128 |
<use xlink:href="#Red100" filter="url(#in)" /> |
| 129 |
</g> |
| 130 |
<g transform="translate(400,25)" enable-background="new" > |
| 131 |
<use xlink:href="#Blue50"/> |
| 132 |
<use xlink:href="#Red50" filter="url(#in)" /> |
| 133 |
<text x="35" y="275">in</text> |
| 134 |
</g> |
| 135 |
<g transform="translate(525,25)" enable-background="new" > |
| 136 |
<use xlink:href="#Blue100"/> |
| 137 |
<use xlink:href="#Red100" filter="url(#out)" /> |
| 138 |
</g> |
| 139 |
<g transform="translate(525,25)" enable-background="new" > |
| 140 |
<use xlink:href="#Blue50"/> |
| 141 |
<use xlink:href="#Red50" filter="url(#out)" /> |
| 142 |
<text x="15" y="275">out</text> |
| 143 |
</g> |
| 144 |
<g transform="translate(650,25)" enable-background="new" > |
| 145 |
<use xlink:href="#Blue100"/> |
| 146 |
<use xlink:href="#Red100" filter="url(#atop)" /> |
| 147 |
</g> |
| 148 |
<g transform="translate(650,25)" enable-background="new" > |
| 149 |
<use xlink:href="#Blue50"/> |
| 150 |
<use xlink:href="#Red50" filter="url(#atop)" /> |
| 151 |
<text x="10" y="275">atop</text> |
| 152 |
</g> |
| 153 |
<g transform="translate(775,25)" enable-background="new" > |
| 154 |
<use xlink:href="#Blue100"/> |
| 155 |
<use xlink:href="#Red100" filter="url(#xor)" /> |
| 156 |
</g> |
| 157 |
<g transform="translate(775,25)" enable-background="new" > |
| 158 |
<use xlink:href="#Blue50"/> |
| 159 |
<use xlink:href="#Red50" filter="url(#xor)" /> |
| 160 |
<text x="15" y="275">xor</text> |
| 161 |
</g> |
| 162 |
<g transform="translate(900,25)" enable-background="new" > |
| 163 |
<use xlink:href="#Blue100"/> |
| 164 |
<use xlink:href="#Red100" filter="url(#arithmetic)" /> |
| 165 |
</g> |
| 166 |
<g transform="translate(900,25)" enable-background="new" > |
| 167 |
<use xlink:href="#Blue50"/> |
| 168 |
<use xlink:href="#Red50" filter="url(#arithmetic)" /> |
| 169 |
<text x="-25" y="275">arithmetic</text> |
| 170 |
</g> |
| 171 |
</g> |
| 172 |
</g> |
| 173 |
<!--======================================================================--> |
| 174 |
<!--Legend and frame: Title, suite and SVG document serialization====--> |
| 175 |
<!--======================================================================--> |
| 176 |
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10"> |
| 177 |
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000"/> |
| 178 |
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/> |
| 179 |
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text> |
| 180 |
<a xlink:href="copyright-documents-19990405.html"> |
| 181 |
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text> |
| 182 |
</a> |
| 183 |
<text font-size="12" x="35" y="330">filters-composite-01</text> |
| 184 |
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text> |
| 185 |
<text font-size="10" x="210" y="345">Release 1.0</text> |
| 186 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 187 |
</g> |
| 188 |
</svg> |