| 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-diffuseLt-BE-07.svg --> |
| 13 |
<!-- renamed for 1.1 suite to filters-diffuse-01-f.svg --> |
| 14 |
<!-- --> |
| 15 |
<!-- Tests operation of the feDiffuseLighting filter. --> |
| 16 |
<!-- --> |
| 17 |
<!-- Author : Vincent Hardy 06-08-2000 --> |
| 18 |
<!-- Revised for 1.1 : Mike Bultrowicz, 4 February 2002 --> |
| 19 |
<!-- --> |
| 20 |
<!-- History: --> |
| 21 |
<!-- 06 08 2000, VH, created --> |
| 22 |
<!-- 09-aug-2000, LH, minor edits for integration; ser#2. --> |
| 23 |
<!-- 16-Aug-2000, LH="rename" ser#3. --> |
| 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 |
Verify the basic operation of the feDiffuseLighting |
| 35 |
element. The test shows three rows of 3 images. Each |
| 36 |
rows tests a different aspect of the filter and shows |
| 37 |
the result of the filtering operation. |
| 38 |
</Paragraph> |
| 39 |
<Paragraph> |
| 40 |
The first row shows the result of varying the |
| 41 |
surfaceScale attribute. The second row shows the result |
| 42 |
of varying the diffuse constant (kd) attribute. The last |
| 43 |
row shows the result of varying the lighting-color |
| 44 |
property. |
| 45 |
</Paragraph> |
| 46 |
<Paragraph> |
| 47 |
The rendered picture should match the reference image. |
| 48 |
</Paragraph> |
| 49 |
</OperatorScript> |
| 50 |
</SVGTestCase> |
| 51 |
<title id="test-title">filters-diffuse-01-f</title> |
| 52 |
<desc id="test-desc">Validates operation of the feDiffuseLighting filter</desc> |
| 53 |
<!--======================================================================--> |
| 54 |
<!--Content of Test Case follows... =====================--> |
| 55 |
<!--======================================================================--> |
| 56 |
<g id="test-body-content"> |
| 57 |
<!-- Title --> |
| 58 |
<text x="145" y="30" fill="black" font-size="12" font-family="Helvetica" font-weight="bold">Filters: feDiffuseLighting</text> |
| 59 |
<!-- ===================================================================== --> |
| 60 |
<!-- Filter definitions --> |
| 61 |
<!-- ===================================================================== --> |
| 62 |
<defs> |
| 63 |
<!-- ================================================= --> |
| 64 |
<!-- Surface scale --> |
| 65 |
<!-- ================================================= --> |
| 66 |
<filter id="surfaceScaleA" filterUnits="objectBoundingBox" |
| 67 |
x="0%" y="0%" width="100%" height="100%"> |
| 68 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="1"> |
| 69 |
<feDistantLight azimuth="45" elevation="45"/> |
| 70 |
</feDiffuseLighting> |
| 71 |
</filter> |
| 72 |
<filter id="surfaceScaleB" filterUnits="objectBoundingBox" |
| 73 |
x="0%" y="0%" width="100%" height="100%"> |
| 74 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10"> |
| 75 |
<feDistantLight azimuth="45" elevation="45"/> |
| 76 |
</feDiffuseLighting> |
| 77 |
</filter> |
| 78 |
<filter id="surfaceScaleC" filterUnits="objectBoundingBox" |
| 79 |
x="0%" y="0%" width="100%" height="100%"> |
| 80 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="-10"> |
| 81 |
<feDistantLight azimuth="45" elevation="45"/> |
| 82 |
</feDiffuseLighting> |
| 83 |
</filter> |
| 84 |
<!-- ================================================= --> |
| 85 |
<!-- Diffuse Constants --> |
| 86 |
<!-- ================================================= --> |
| 87 |
<filter id="diffuseConstantA" filterUnits="objectBoundingBox" |
| 88 |
x="0%" y="0%" width="100%" height="100%"> |
| 89 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="0" surfaceScale="10"> |
| 90 |
<feDistantLight azimuth="45" elevation="45"/> |
| 91 |
</feDiffuseLighting> |
| 92 |
</filter> |
| 93 |
<filter id="diffuseConstantB" filterUnits="objectBoundingBox" |
| 94 |
x="0%" y="0%" width="100%" height="100%"> |
| 95 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10"> |
| 96 |
<feDistantLight azimuth="45" elevation="45"/> |
| 97 |
</feDiffuseLighting> |
| 98 |
</filter> |
| 99 |
<filter id="diffuseConstantC" filterUnits="objectBoundingBox" |
| 100 |
x="0%" y="0%" width="100%" height="100%"> |
| 101 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="2" surfaceScale="10"> |
| 102 |
<feDistantLight azimuth="45" elevation="45"/> |
| 103 |
</feDiffuseLighting> |
| 104 |
</filter> |
| 105 |
<!-- ================================================= --> |
| 106 |
<!-- Lighting colors --> |
| 107 |
<!-- ================================================= --> |
| 108 |
<filter id="lightingColorA" filterUnits="objectBoundingBox" |
| 109 |
x="0%" y="0%" width="100%" height="100%"> |
| 110 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="red" > |
| 111 |
<feDistantLight azimuth="45" elevation="45"/> |
| 112 |
</feDiffuseLighting> |
| 113 |
</filter> |
| 114 |
<filter id="lightingColorB" filterUnits="objectBoundingBox" |
| 115 |
x="0%" y="0%" width="100%" height="100%"> |
| 116 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="yellow" > |
| 117 |
<feDistantLight azimuth="45" elevation="45"/> |
| 118 |
</feDiffuseLighting> |
| 119 |
</filter> |
| 120 |
<filter id="lightingColorC" filterUnits="objectBoundingBox" |
| 121 |
x="0%" y="0%" width="100%" height="100%"> |
| 122 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="blue" > |
| 123 |
<feDistantLight azimuth="45" elevation="45"/> |
| 124 |
</feDiffuseLighting> |
| 125 |
</filter> |
| 126 |
</defs> |
| 127 |
<!-- ==================================================== --> |
| 128 |
<!-- The same image is rendered multiple times with using --> |
| 129 |
<!-- different filters. --> |
| 130 |
<!-- ==================================================== --> |
| 131 |
<!-- Various Surface Scales --> |
| 132 |
<g transform="translate(0, 50)"> |
| 133 |
<text x="90" y="25">Various values for surfaceScale: 1, 10 and -10</text> |
| 134 |
<image xlink:href="bumpMap2.png" x="90" y="30" width="50" height="30" filter="url(#surfaceScaleA)" /> |
| 135 |
<image xlink:href="bumpMap2.png" x="160" y="30" width="50" height="30" filter="url(#surfaceScaleB)" /> |
| 136 |
<image xlink:href="bumpMap2.png" x="230" y="30" width="50" height="30" filter="url(#surfaceScaleC)" /> |
| 137 |
</g> |
| 138 |
<!-- Various Diffuse Constants --> |
| 139 |
<g transform="translate(0, 120)"> |
| 140 |
<text x="90" y="25">Various values for diffuseConstants: 0, 1 and 2</text> |
| 141 |
<image xlink:href="bumpMap2.png" x="90" y="30" width="50" height="30" filter="url(#diffuseConstantA)" /> |
| 142 |
<image xlink:href="bumpMap2.png" x="160" y="30" width="50" height="30" filter="url(#diffuseConstantB)" /> |
| 143 |
<image xlink:href="bumpMap2.png" x="230" y="30" width="50" height="30" filter="url(#diffuseConstantC)" /> |
| 144 |
</g> |
| 145 |
<!-- Various Light Colors --> |
| 146 |
<g transform="translate(0, 190)"> |
| 147 |
<text x="90" y="25">Various values for lighting color: red, yellow and blue</text> |
| 148 |
<image xlink:href="bumpMap2.png" x="90" y="30" width="50" height="30" filter="url(#lightingColorA)" /> |
| 149 |
<image xlink:href="bumpMap2.png" x="160" y="30" width="50" height="30" filter="url(#lightingColorB)" /> |
| 150 |
<image xlink:href="bumpMap2.png" x="230" y="30" width="50" height="30" filter="url(#lightingColorC)" /> |
| 151 |
</g> |
| 152 |
<!-- ===================================================== --> |
| 153 |
<!-- Legends --> |
| 154 |
<!-- ===================================================== --> |
| 155 |
<!-- Surface Scale --> |
| 156 |
</g> |
| 157 |
<!--======================================================================--> |
| 158 |
<!--Legend and frame: Title, suite and SVG document serialization====--> |
| 159 |
<!--======================================================================--> |
| 160 |
<g id="test-legend" fill="black" font-family="Helvetica" font-size="10"> |
| 161 |
<rect x="10" y="300" width="275" height="50" fill="none" stroke="#000000"/> |
| 162 |
<path fill="none" stroke="#000000" d="M10 315 h275 M205 315 v35 M10 336 h195 M205 332 h80"/> |
| 163 |
<text x="25" y="311">Scalable Vector Graphics (SVG) v1.1 Conformance Suite</text> |
| 164 |
<a xlink:href="copyright-documents-19990405.html"> |
| 165 |
<text x="12" y="347" fill="blue" >Copyright 2002 W3C. All Rights Reserved.</text> |
| 166 |
</a> |
| 167 |
<text font-size="12" x="35" y="330">filters-diffuse-01</text> |
| 168 |
<text font-size="10" x="210" y="327">$Revision: 1.1 $</text> |
| 169 |
<text font-size="10" x="210" y="345">Release 1.0</text> |
| 170 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 171 |
</g> |
| 172 |
</svg> |