| 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="CL" author="BB" status="accepted" |
| 15 |
version="$Revision: 1.5 $" testname="$RCSfile: pservers-grad-14-b.svg,v $"> |
| 16 |
<d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/pservers.html#Gradients"> |
| 17 |
<p> |
| 18 |
The intent of this file is to test the 4 allowed spread methods for linear and radial gradients. |
| 19 |
The 4 values (pad, reflect, repeat and default) are available for both types of gradients. |
| 20 |
On the left side are the linear gradient results, and on the right, the radial results. |
| 21 |
The UA should render a result equivalent to the reference image. |
| 22 |
</p> |
| 23 |
</d:testDescription> |
| 24 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 25 |
<p>Run the test. No interaction required.</p> |
| 26 |
</d:operatorScript> |
| 27 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 28 |
<p>The test passes if the rendered image matches the reference image, except |
| 29 |
for any differences in font choice due to CSS2.</p> |
| 30 |
</d:passCriteria> |
| 31 |
</d:SVGTestCase> |
| 32 |
<title id="test-title">$RCSfile: pservers-grad-14-b.svg,v $</title> |
| 33 |
<defs> |
| 34 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 35 |
<font-face-src> |
| 36 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 37 |
</font-face-src> |
| 38 |
</font-face> |
| 39 |
</defs> |
| 40 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 41 |
<defs> |
| 42 |
<linearGradient id="lgSpreadPad" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100" spreadMethod="pad"> |
| 43 |
<stop offset="000%" stop-color="black"/> |
| 44 |
<stop offset="100%" stop-color="gold"/> |
| 45 |
</linearGradient> |
| 46 |
|
| 47 |
<linearGradient id="lgSpreadReflect" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100" spreadMethod="reflect"> |
| 48 |
<stop offset="000%" stop-color="black"/> |
| 49 |
<stop offset="100%" stop-color="gold"/> |
| 50 |
</linearGradient> |
| 51 |
|
| 52 |
<linearGradient id="lgSpreadRepeat" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100" spreadMethod="repeat"> |
| 53 |
<stop offset="000%" stop-color="black"/> |
| 54 |
<stop offset="100%" stop-color="gold"/> |
| 55 |
</linearGradient> |
| 56 |
|
| 57 |
<linearGradient id="lgSpreadDefault" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100"> |
| 58 |
<stop offset="000%" stop-color="black"/> |
| 59 |
<stop offset="100%" stop-color="gold"/> |
| 60 |
</linearGradient> |
| 61 |
|
| 62 |
<radialGradient id="rgSpreadPad" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2" spreadMethod="pad"> |
| 63 |
<stop offset="000%" stop-color="black"/> |
| 64 |
<stop offset="100%" stop-color="gold"/> |
| 65 |
</radialGradient> |
| 66 |
|
| 67 |
<radialGradient id="rgSpreadReflect" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2" spreadMethod="reflect"> |
| 68 |
<stop offset="000%" stop-color="black"/> |
| 69 |
<stop offset="100%" stop-color="gold"/> |
| 70 |
</radialGradient> |
| 71 |
|
| 72 |
<radialGradient id="rgSpreadRepeat" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2" spreadMethod="repeat"> |
| 73 |
<stop offset="000%" stop-color="black"/> |
| 74 |
<stop offset="100%" stop-color="gold"/> |
| 75 |
</radialGradient> |
| 76 |
|
| 77 |
<radialGradient id="rgSpreadDefault" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2"> |
| 78 |
<stop offset="000%" stop-color="black"/> |
| 79 |
<stop offset="100%" stop-color="gold"/> |
| 80 |
</radialGradient> |
| 81 |
</defs> |
| 82 |
|
| 83 |
<text font-size="20" x="240" y="30" text-anchor="middle">Gradient 'spreadMethod' values</text> |
| 84 |
|
| 85 |
<rect x="10" y="060" width="225" height="40" fill="url(#lgSpreadPad)" stroke="none"/> |
| 86 |
<text font-size="16" x="10" y="55">spreadMethod="pad"</text> |
| 87 |
|
| 88 |
<rect x="10" y="130" width="225" height="40" fill="url(#lgSpreadReflect)" stroke="none"/> |
| 89 |
<text font-size="16" x="10" y="125">spreadMethod="reflect"</text> |
| 90 |
|
| 91 |
<rect x="10" y="200" width="225" height="40" fill="url(#lgSpreadRepeat)" stroke="none"/> |
| 92 |
<text font-size="16" x="10" y="195">spreadMethod="repeat"</text> |
| 93 |
|
| 94 |
<rect x="10" y="270" width="225" height="40" fill="url(#lgSpreadDefault)" stroke="none"/> |
| 95 |
<text font-size="16" x="10" y="265">spreadMethod="default"</text> |
| 96 |
|
| 97 |
|
| 98 |
<rect x="245" y="060" width="225" height="40" fill="url(#rgSpreadPad)" stroke="none"/> |
| 99 |
<text font-size="16" x="245" y="55">spreadMethod="pad"</text> |
| 100 |
|
| 101 |
<rect x="245" y="130" width="225" height="40" fill="url(#rgSpreadReflect)" stroke="none"/> |
| 102 |
<text font-size="16" x="245" y="125">spreadMethod="reflect"</text> |
| 103 |
|
| 104 |
<rect x="245" y="200" width="225" height="40" fill="url(#rgSpreadRepeat)" stroke="none"/> |
| 105 |
<text font-size="16" x="245" y="195">spreadMethod="repeat"</text> |
| 106 |
|
| 107 |
<rect x="245" y="270" width="225" height="40" fill="url(#rgSpreadDefault)" stroke="none"/> |
| 108 |
<text font-size="16" x="245" y="265">spreadMethod="default"</text> |
| 109 |
</g> |
| 110 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 111 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text> |
| 112 |
</g> |
| 113 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 114 |
<!-- comment out this watermark once the test is approved --> |
| 115 |
<!--<g id="draft-watermark"> |
| 116 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 117 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 118 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 119 |
</g>--> |
| 120 |
</svg> |