Debian Codegraph @

test_non_regression/svg/pservers-grad-07-b.svg

raw
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.8 $" testname="$RCSfile: pservers-grad-07-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 objects and text.
20 </p>
21 <p>
22 This test uses the following elements : &lt;linearGradient&gt;, &lt;stop&gt;
23 and the following properties : stop-color, fill:url(# ), stroke(url# )
24 </p>
25 <p>
26 Both elements in this test use the same simple gradient. It is a linear gradient from
27 blue (left) to lime (right). From top-down the appearance of objects is as follows.
28 </p>
29 <p>
30 The top rectangle should be filled with the gradient.
31 </p>
32 <p>
33 The next rectangle has no fill, but has a thick stroke on which the gradient is
34 applied.
35 </p>
36 </d:testDescription>
37 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
38 <p>Run the test. No interaction required.</p>
39 </d:operatorScript>
40 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
41 <p>The test passes if the rendering matches the reference image, apart
42 from any differences in font choice due to CSS2 rules. Specifically:</p>
43 <ul>
44 <li>The top rectangle is filled with a gradient from blue on the left to lime on the right.</li>
45 <li>The bottom rectangle is unfilled and stroked with a thick stroke using a gradient from blue on the left to lime on the right.</li>
46 </ul>
47 </d:passCriteria>
48 </d:SVGTestCase>
49 <title id="test-title">$RCSfile: pservers-grad-07-b.svg,v $</title>
50 <defs>
51 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
52 <font-face-src>
53 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
54 </font-face-src>
55 </font-face>
56 </defs>
57 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
58 <g transform="scale(1, 1.5)">
59 <!-- ====================================================================== -->
60 <!-- Very simple blue to red linear gradient from left to right ========== -->
61 <!-- ====================================================================== -->
62 <linearGradient id="Gradient" gradientUnits="userSpaceOnUse" x1="10" y1="10" x2="440" y2="10">
63 <stop stop-color="blue" offset="0"/>
64 <stop stop-color="lime" offset="1"/>
65 </linearGradient>
66 <!-- ====================================================================== -->
67 <!-- Linear gradient on the fill of a rectangle ======== -->
68 <!-- ====================================================================== -->
69 <rect x="10" y="10" width="430" height="60" fill="url(#Gradient)"/>
70 <text font-size="24" x="10" y="90">Linear gradient filled rectangle</text>
71 <!-- ====================================================================== -->
72 <!-- Linear gradient on the stroke of a rectangle ======== -->
73 <!-- ====================================================================== -->
74 <rect x="25" y="110" width="400" height="30" fill="none" stroke="url(#Gradient)" stroke-width="20"/>
75 <text font-size="24" x="10" y="170">Linear gradient on stroke of rectangle</text>
76 </g>
77 </g>
78 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
79 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
80 </g>
81 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
82 <!-- comment out this watermark once the test is approved -->
83 <!--<g id="draft-watermark">
84 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
85 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
86 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
87 </g>-->
88 </svg>