| 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="Haroon Sheikh" status="accepted" |
| 15 |
version="$Revision: 1.13 $" testname="$RCSfile: pservers-grad-08-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 |
Test that the viewer has basic capability to handle linear gradients |
| 19 |
on fills and stroke of text. |
| 20 |
</p> |
| 21 |
<p> |
| 22 |
Both elements in this test use the same simple gradient. It is a linear gradient from blue (left) to lime (right). From top-down the appearance of objects is as follows. |
| 23 |
</p> |
| 24 |
<p> |
| 25 |
The first item is a text string "Gradient on fill" with the gradient on the fill of the text. |
| 26 |
</p> |
| 27 |
<p> |
| 28 |
The second item is a text string that is not filled. It has a 2 user unit stroke on which the gradient is applied. |
| 29 |
</p> |
| 30 |
</d:testDescription> |
| 31 |
<d:operatorScript xmlns="http://www.w3.org/1999/xhtml"> |
| 32 |
<p>Run the test. No interaction required.</p> |
| 33 |
</d:operatorScript> |
| 34 |
<d:passCriteria xmlns="http://www.w3.org/1999/xhtml"> |
| 35 |
<p>The test passes if the rendering matches the reference image, apart |
| 36 |
from any differences in font choice due to CSS2 rules. Specifically:</p> |
| 37 |
<ul> |
| 38 |
<li>The text string "Gradient on fill" must be filled with a gradient |
| 39 |
from blue on the left to lime on the right.</li> |
| 40 |
<li>The text string "Gradient on stroke" must be unfilled and stroked with |
| 41 |
a gradient from blue on the left to lime on the right.</li> |
| 42 |
</ul> |
| 43 |
</d:passCriteria> |
| 44 |
</d:SVGTestCase> |
| 45 |
<title id="test-title">$RCSfile: pservers-grad-08-b.svg,v $</title> |
| 46 |
<defs> |
| 47 |
<font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F"> |
| 48 |
<font-face-src> |
| 49 |
<font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/> |
| 50 |
</font-face-src> |
| 51 |
</font-face> |
| 52 |
</defs> |
| 53 |
|
| 54 |
<g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18"> |
| 55 |
<style type="text/css"> |
| 56 |
@font-face { |
| 57 |
font-family: Blocky; |
| 58 |
src: url(woffs/Blocky.woff) format("woff"); |
| 59 |
</style> |
| 60 |
<defs> |
| 61 |
<font-face font-family="Blocky" unicode-range="U+0-7F"> |
| 62 |
<font-face-src> |
| 63 |
<font-face-uri xlink:href="../resources/Blocky.svg#Blocky"/> |
| 64 |
</font-face-src> |
| 65 |
</font-face> |
| 66 |
</defs> |
| 67 |
<g transform="scale(1, 1.5)"> |
| 68 |
<!-- ====================================================================== --> |
| 69 |
<!-- Very simple blue to red linear gradient from left to right ========== --> |
| 70 |
<!-- ====================================================================== --> |
| 71 |
<linearGradient id="Gradient" gradientUnits="userSpaceOnUse" x1="10" y1="10" x2="440" y2="10"> |
| 72 |
<stop stop-color="blue" offset="0"/> |
| 73 |
<stop stop-color="lime" offset="1"/> |
| 74 |
</linearGradient> |
| 75 |
<!-- ====================================================================== --> |
| 76 |
<!-- Gradient on fill of text ======== --> |
| 77 |
<!-- ====================================================================== --> |
| 78 |
<text font-family="Blocky" font-size="68" fill="url(#Gradient)" x="20" y="70">Gradient on fill</text> |
| 79 |
<!-- ====================================================================== --> |
| 80 |
<!-- Gradient on stroke of text ======== --> |
| 81 |
<!-- ====================================================================== --> |
| 82 |
<text font-family="Blocky" x="20" y="160" font-size="55" fill="none" stroke="url(#Gradient)" stroke-width="3">Gradient on stroke</text> |
| 83 |
|
| 84 |
</g> |
| 85 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="28"> |
| 86 |
<text x="40" y="145">Linear gradient on filled text</text> |
| 87 |
<text x="30" y="280">Linear gradient on stroke of text</text> |
| 88 |
</g> |
| 89 |
</g> |
| 90 |
<g font-family="SVGFreeSansASCII,sans-serif" font-size="32"> |
| 91 |
<text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.13 $</text> |
| 92 |
</g> |
| 93 |
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| 94 |
<!-- comment out this watermark once the test is approved --> |
| 95 |
<!--<g id="draft-watermark"> |
| 96 |
<rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/> |
| 97 |
<text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" |
| 98 |
text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text> |
| 99 |
</g>--> |
| 100 |
</svg> |