| 1 |
<svg version="1.1" baseProfile="full" 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="Vincent Hardy" status="accepted" |
| 15 |
version="$Revision: 1.6 $" testname="$RCSfile: filters-diffuse-01-f.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/filters.html#feDiffuseLightingElement"> |
| 17 |
<p> |
| 18 |
Verify the basic operation of the feDiffuseLighting |
| 19 |
element. The test shows three rows of 3 images. Each |
| 20 |
rows tests a different aspect of the filter and shows |
| 21 |
the result of the filtering operation. |
| 22 |
</p> |
| 23 |
<p> |
| 24 |
The first row shows the result of varying the |
| 25 |
surfaceScale attribute. The second row shows the result |
| 26 |
of varying the diffuse constant (kd) attribute. The last |
| 27 |
row shows the result of varying the lighting-color |
| 28 |
property. |
| 29 |
</p> |
| 30 |
</d:testDescription> |
| 31 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 32 |
<p> |
| 33 |
Run the test. No interaction required. |
| 34 |
</p> |
| 35 |
</d:operatorScript> |
| 36 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 37 |
<p> |
| 38 |
The rendered picture should match the reference image. |
| 39 |
</p> |
| 40 |
</d:passCriteria> |
| 41 |
</d:SVGTestCase> |
| 42 |
<title id="test-title">$RCSfile: filters-diffuse-01-f.svg,v $</title> |
| 43 |
<defs> |
| 44 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 45 |
<font-face-src> |
| 46 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 47 |
</font-face-src> |
| 48 |
</font-face> |
| 49 |
</defs> |
| 50 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 51 |
<!-- Title --> |
| 52 |
<text x="145" y="30" fill="black" font-size="12" font-family="Arial" font-weight="bold">Filters: feDiffuseLighting</text> |
| 53 |
<!-- ===================================================================== --> |
| 54 |
<!-- Filter definitions --> |
| 55 |
<!-- ===================================================================== --> |
| 56 |
<defs> |
| 57 |
<!-- ================================================= --> |
| 58 |
<!-- Surface scale --> |
| 59 |
<!-- ================================================= --> |
| 60 |
<filter id="surfaceScaleA" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 61 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="1"> |
| 62 |
<feDistantLight azimuth="45" elevation="45"/> |
| 63 |
</feDiffuseLighting> |
| 64 |
</filter> |
| 65 |
<filter id="surfaceScaleB" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 66 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10"> |
| 67 |
<feDistantLight azimuth="45" elevation="45"/> |
| 68 |
</feDiffuseLighting> |
| 69 |
</filter> |
| 70 |
<filter id="surfaceScaleC" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 71 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="-10"> |
| 72 |
<feDistantLight azimuth="45" elevation="45"/> |
| 73 |
</feDiffuseLighting> |
| 74 |
</filter> |
| 75 |
<!-- ================================================= --> |
| 76 |
<!-- Diffuse Constants --> |
| 77 |
<!-- ================================================= --> |
| 78 |
<filter id="diffuseConstantA" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 79 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="0" surfaceScale="10"> |
| 80 |
<feDistantLight azimuth="45" elevation="45"/> |
| 81 |
</feDiffuseLighting> |
| 82 |
</filter> |
| 83 |
<filter id="diffuseConstantB" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 84 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10"> |
| 85 |
<feDistantLight azimuth="45" elevation="45"/> |
| 86 |
</feDiffuseLighting> |
| 87 |
</filter> |
| 88 |
<filter id="diffuseConstantC" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 89 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="2" surfaceScale="10"> |
| 90 |
<feDistantLight azimuth="45" elevation="45"/> |
| 91 |
</feDiffuseLighting> |
| 92 |
</filter> |
| 93 |
<!-- ================================================= --> |
| 94 |
<!-- Lighting colors --> |
| 95 |
<!-- ================================================= --> |
| 96 |
<filter id="lightingColorA" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 97 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="red"> |
| 98 |
<feDistantLight azimuth="45" elevation="45"/> |
| 99 |
</feDiffuseLighting> |
| 100 |
</filter> |
| 101 |
<filter id="lightingColorB" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 102 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="yellow"> |
| 103 |
<feDistantLight azimuth="45" elevation="45"/> |
| 104 |
</feDiffuseLighting> |
| 105 |
</filter> |
| 106 |
<filter id="lightingColorC" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%"> |
| 107 |
<feDiffuseLighting in="SourceGraphic" diffuseConstant="1" surfaceScale="10" lighting-color="blue"> |
| 108 |
<feDistantLight azimuth="45" elevation="45"/> |
| 109 |
</feDiffuseLighting> |
| 110 |
</filter> |
| 111 |
</defs> |
| 112 |
<!-- ==================================================== --> |
| 113 |
<!-- The same image is rendered multiple times with using --> |
| 114 |
<!-- different filters. --> |
| 115 |
<!-- ==================================================== --> |
| 116 |
<!-- Various Surface Scales --> |
| 117 |
<g transform="translate(0, 50)"> |
| 118 |
<text x="90" y="25">Various values for surfaceScale: 1, 10 and -10</text> |
| 119 |
<image xlink:href="../images/bumpMap2.png" x="90" y="30" width="50" height="30" filter="url(#surfaceScaleA)"/> |
| 120 |
<image xlink:href="../images/bumpMap2.png" x="160" y="30" width="50" height="30" filter="url(#surfaceScaleB)"/> |
| 121 |
<image xlink:href="../images/bumpMap2.png" x="230" y="30" width="50" height="30" filter="url(#surfaceScaleC)"/> |
| 122 |
</g> |
| 123 |
<!-- Various Diffuse Constants --> |
| 124 |
<g transform="translate(0, 120)"> |
| 125 |
<text x="90" y="25">Various values for diffuseConstants: 0, 1 and 2</text> |
| 126 |
<image xlink:href="../images/bumpMap2.png" x="90" y="30" width="50" height="30" filter="url(#diffuseConstantA)"/> |
| 127 |
<image xlink:href="../images/bumpMap2.png" x="160" y="30" width="50" height="30" filter="url(#diffuseConstantB)"/> |
| 128 |
<image xlink:href="../images/bumpMap2.png" x="230" y="30" width="50" height="30" filter="url(#diffuseConstantC)"/> |
| 129 |
</g> |
| 130 |
<!-- Various Light Colors --> |
| 131 |
<g transform="translate(0, 190)"> |
| 132 |
<text x="90" y="25">Various values for lighting color: red, yellow and blue</text> |
| 133 |
<image xlink:href="../images/bumpMap2.png" x="90" y="30" width="50" height="30" filter="url(#lightingColorA)"/> |
| 134 |
<image xlink:href="../images/bumpMap2.png" x="160" y="30" width="50" height="30" filter="url(#lightingColorB)"/> |
| 135 |
<image xlink:href="../images/bumpMap2.png" x="230" y="30" width="50" height="30" filter="url(#lightingColorC)"/> |
| 136 |
</g> |
| 137 |
<!-- ===================================================== --> |
| 138 |
<!-- Legends --> |
| 139 |
<!-- ===================================================== --> |
| 140 |
<!-- Surface Scale --> |
| 141 |
</g> |
| 142 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 143 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text> |
| 144 |
</g> |
| 145 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 146 |
<!-- comment out this watermark once the test is approved --> |
| 147 |
<!--<g id="draft-watermark"> |
| 148 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 149 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 150 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 151 |
</g>--> |
| 152 |
</svg> |