Debian Codegraph @

test_non_regression/svg/pservers-grad-11-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-11-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 radial gradients
19 on fills and stroke of objects and text.
20 </p>
21 <p>
22 This test uses the following elements : &lt;radialGradient&gt;, &lt;stop&gt;
23 and the following properties : stop-color, fill:url(# ), stroke(url# )
24 </p>
25 <p>
26 From top-down (left to right) the appearance of objects is as follows.
27 </p>
28 <p>
29 The top left rectangle should be a radial gradient from dark blue (in) to lime (outside).
30 The gradient is applied to the fill of the rectangle.
31 </p>
32 <p>
33 The next rectangle has no fill, but has a thick stroke on which the gradient is
34 applied. The gradient goes from dark orange(in) to pale yellow (out).
35 </p>
36 <p>
37 The next item is a text with a radial gradient on the fill. The gradient goes
38 from green (in) to yellow (out).
39 </p>
40 <p>
41 The last item is a text with a 2 user unit stroke on which a black (in) to magenta
42 (out) linear gradient is applied.
43 </p>
44 </d:testDescription>
45 <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
46 <p>Run the test. No interaction required.</p>
47 </d:operatorScript>
48 <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
49 <p>The test passes if the rendering matches the reference image, apart
50 from any differences in font choice due to CSS2 rules. Specifically:</p>
51 <ul>
52 <li>The top-left rectangle must be filled with a circular radial gradient
53 with dark blue inside and lime outside. The center point of the gradient
54 is in the lower-left quadrant of the rectangle.</li>
55 <li>The top-right rectangle has no fill, but a thick stroke which is painted
56 with a radial gradient with dark orange inside and yellow outside. The
57 center point of this gradient is in the lower-left quadrant of the
58 rectangle.</li>
59 <li>The "Gradient on text fill" text must be filled with a circular radial
60 gradient with green inside and yellow outside. The center point of the
61 gradient is the center of the text.</li>
62 <li>The "Gradient on text stroke" has no fill, but a stroke which is painted with
63 a circular radial gradient with black inside and pink outside. The center point of the
64 gradient is the center of the text.</li>
65 </ul>
66 </d:passCriteria>
67 </d:SVGTestCase>
68 <title id="test-title">$RCSfile: pservers-grad-11-b.svg,v $</title>
69 <defs>
70 <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
71 <font-face-src>
72 <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
73 </font-face-src>
74 </font-face>
75 </defs>
76 <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
77 <!-- ====================================================================== -->
78 <!-- Very simple black to red radial gradient ======== -->
79 <!-- ====================================================================== -->
80 <radialGradient gradientUnits="userSpaceOnUse" id="Grad1" cx="75" cy="100" r="130" fx="75" fy="100">
81 <stop stop-color="#009" offset="0"/>
82 <stop stop-color="#2e2" offset="1"/>
83 </radialGradient>
84 <rect x="10" y="10" width="210" height="140" fill="url(#Grad1)"/>
85 <text font-family="Arial" font-size="12" x="10" y="165">Radial gradient on fill of rectangle</text>
86 <!-- ====================================================================== -->
87 <!-- Radial gradient on the stroke of a rectangle ======== -->
88 <!-- ====================================================================== -->
89 <radialGradient id="Grad2" gradientUnits="userSpaceOnUse" cx="295" cy="100" r="150" fx="295" fy="100">
90 <stop stop-color="#e22" offset="0"/>
91 <stop stop-color="#ff6" offset="1"/>
92 </radialGradient>
93 <rect x="250" y="30" width="170" height="100" fill="none" stroke="url(#Grad2)" stroke-width="40"/>
94 <text font-family="Arial" font-size="12" x="230" y="165">Radial gradient on stroke of rectangle</text>
95 <!-- ====================================================================== -->
96 <!-- Gradient on fill of text ======== -->
97 <!-- ====================================================================== -->
98 <radialGradient id="Grad3" gradientUnits="userSpaceOnUse" cx="225" cy="180" r="90" fx="225" fy="180">
99 <stop stop-color="#060" offset="0"/>
100 <stop stop-color="yellow" offset="1"/>
101 </radialGradient>
102 <text font-family="Arial" font-size="50" fill="url(#Grad3)" x="10" y="210">Gradient on text fill</text>
103 <text font-family="Arial" font-size="12" x="10" y="225">Radial gradient on text, black to yellow</text>
104 <!-- ====================================================================== -->
105 <!-- Gradient on stroke of text ======== -->
106 <!-- ====================================================================== -->
107 <radialGradient id="Grad4" gradientUnits="userSpaceOnUse" cx="225" cy="245" r="90" fx="225" fy="245">
108 <stop stop-color="black" offset="0"/>
109 <stop stop-color="#D6D" offset="1"/>
110 </radialGradient>
111 <text font-family="Arial" font-size="45" fill="none" stroke="url(#Grad4)" stroke-width="2" x="10" y="270">Gradient on text stroke</text>
112 <text font-family="Arial" font-size="12" x="10" y="285">Radial gradient on stroke of text, black to red</text>
113 </g>
114 <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
115 <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
116 </g>
117 <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
118 <!-- comment out this watermark once the test is approved -->
119 <!--<g id="draft-watermark">
120 <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
121 <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
122 text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
123 </g>-->
124 </svg>